File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,13 +2,12 @@ FROM lsiobase/xenial
22MAINTAINER 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
98ENV DEBIAN_FRONTEND="noninteractive"
109ENV 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
1413RUN \
Original file line number Diff line number Diff line change @@ -77,10 +77,10 @@ INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
7777
7878# start update routine
7979if [[ "$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 )
8181elif [[ "$VERSION" = public ]]; then
8282PLEX_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 )
8484else
8585REMOTE_VERSION="${VERSION}"
8686fi
9292
9393echo "Atempting to upgrade to: $REMOTE_VERSION"
9494last=130
95- down_tries=0
9695while [[ $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=$?
101100done
102101
103102# test if deb exists, install it or exit out
You can’t perform that action at this time.
0 commit comments