Skip to content

Commit 892c17b

Browse files
committed
correcting locations, would be just bloody dandy if plex had some semblance of consistency in it's locations
1 parent 1d6831d commit 892c17b

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ FROM lsiobase/xenial
22
MAINTAINER Stian Larsen, sparklyballs
33

44
# package version
5-
ENV PLEX_URL="https://plex.tv/downloads"
6-
ENV PLEX_INSTALL="${PLEX_URL}/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu"
5+
ENV PLEX_INSTALL="https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu"
76

87
# global environment settings
98
ENV DEBIAN_FRONTEND="noninteractive"
109
ENV HOME="/config"
11-
ENV PLEX_WWW="${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"
10+
ENV PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server"
1211

1312
# install packages
1413
RUN \

root/etc/cont-init.d/50-plex-update

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
7777

7878
# start update routine
7979
if [[ "$VERSION" = latest ]] || [[ "$VERSION" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then
80-
REMOTE_VERSION=$(curl -s "${PLEX_WWW}"| cut -d "/" -f 5 )
80+
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
8181
elif [[ "$VERSION" = public ]]; then
8282
PLEX_TOKEN=""
83-
REMOTE_VERSION=$(curl -s "${PLEX_WWW}"| cut -d "/" -f 5 )
83+
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
8484
else
8585
REMOTE_VERSION="${VERSION}"
8686
fi
@@ -92,12 +92,11 @@ fi
9292

9393
echo "Atempting to upgrade to: $REMOTE_VERSION"
9494
last=130
95-
down_tries=0
9695
while [[ $last -ne "0" ]]; do
9796
rm -f /tmp/plexmediaserver_*.deb
9897
curl -o /tmp/plexmediaserver_"${REMOTE_VERSION}"_amd64.deb -L \
99-
"${PLEX_URL}/plex-media-server/${REMOTE_VERSION}/plexmediaserver_${REMOTE_VERSION}_amd64.deb"
100-
last=$?
98+
"${PLEX_DOWNLOAD}/$REMOTE_VERSION/plexmediaserver_${REMOTE_VERSION}_amd64.deb"
99+
last=$?
101100
done
102101

103102
# test if deb exists, install it or exit out

0 commit comments

Comments
 (0)