diff --git a/Dockerfile b/Dockerfile index 4d526d9..5440813 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,12 @@ MAINTAINER Stian Larsen, sparklyballs # package version ENV PLEX_URL="https://plex.tv/downloads" -ARG PLEX_WWW="${PLEX_URL}/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu" +ENV PLEX_INSTALL="${PLEX_URL}/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" # install packages RUN \ @@ -20,7 +21,7 @@ RUN \ # install plex curl -o \ /tmp/plexmediaserver.deb -L \ - "${PLEX_WWW}" && \ + "${PLEX_INSTALL}" && \ dpkg -i /tmp/plexmediaserver.deb && \ # cleanup diff --git a/root/etc/cont-init.d/50-plex-update b/root/etc/cont-init.d/50-plex-update index 5d8f195..62dd7d6 100644 --- a/root/etc/cont-init.d/50-plex-update +++ b/root/etc/cont-init.d/50-plex-update @@ -17,6 +17,20 @@ cat > "${NOVERSION_SET}" <<-EOFVERSION ####################################################### EOFVERSION +# set update failed message +[[ -e /tmp/update_fail.nfo ]] && \ + rm /tmp/update_fail.nfo +UPGRADE_FAIL='/tmp/update_fail.nfo' +cat > "${UPGRADE_FAIL}" <<-EOFFAIL +######################################################## +# Upgrade attempt failed, this could be because either # +# plex update site is down, local network issues, or # +# you were trying to get a version that simply doesn't # +# exist, check over the VERSION variable thoroughly & # +# correct it or try again later. # +######################################################## +EOFFAIL + # test for no version set or opt out for autoupdates if [[ -z "$VERSION" ]] || [[ "$VERSION" == "0" ]] || [[ ! -z "$ADVANCED_DISABLEUPDATES" ]]; then printf "\n\n\n%s\n\n\n" "$(