From 892c17b0b8226ef9c6e9e6cf170b2974d0c93230 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Tue, 23 Aug 2016 08:57:18 +0100 Subject: [PATCH] correcting locations, would be just bloody dandy if plex had some semblance of consistency in it's locations --- Dockerfile | 5 ++--- root/etc/cont-init.d/50-plex-update | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5440813..73a4632 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,12 @@ FROM lsiobase/xenial MAINTAINER Stian Larsen, sparklyballs # package version -ENV PLEX_URL="https://plex.tv/downloads" -ENV PLEX_INSTALL="${PLEX_URL}/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu" +ENV PLEX_INSTALL="https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu" # global environment settings ENV DEBIAN_FRONTEND="noninteractive" ENV HOME="/config" -ENV PLEX_WWW="${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN" +ENV PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server" # install packages RUN \ diff --git a/root/etc/cont-init.d/50-plex-update b/root/etc/cont-init.d/50-plex-update index d53410b..f0b429c 100644 --- a/root/etc/cont-init.d/50-plex-update +++ b/root/etc/cont-init.d/50-plex-update @@ -77,10 +77,10 @@ INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver) # start update routine if [[ "$VERSION" = latest ]] || [[ "$VERSION" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then -REMOTE_VERSION=$(curl -s "${PLEX_WWW}"| cut -d "/" -f 5 ) +REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 ) elif [[ "$VERSION" = public ]]; then PLEX_TOKEN="" -REMOTE_VERSION=$(curl -s "${PLEX_WWW}"| cut -d "/" -f 5 ) +REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 ) else REMOTE_VERSION="${VERSION}" fi @@ -92,12 +92,11 @@ fi echo "Atempting to upgrade to: $REMOTE_VERSION" last=130 -down_tries=0 while [[ $last -ne "0" ]]; do rm -f /tmp/plexmediaserver_*.deb curl -o /tmp/plexmediaserver_"${REMOTE_VERSION}"_amd64.deb -L \ - "${PLEX_URL}/plex-media-server/${REMOTE_VERSION}/plexmediaserver_${REMOTE_VERSION}_amd64.deb" - last=$? + "${PLEX_DOWNLOAD}/$REMOTE_VERSION/plexmediaserver_${REMOTE_VERSION}_amd64.deb" +last=$? done # test if deb exists, install it or exit out