diff --git a/README.md b/README.md index 0cb98b2..54a2311 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ Valid settings for VERSION are:- ## Versions ++ **03.01.17:** Use case insensitive version variable matching rather than export and make lowercase. + **17.10.16:** Allow use of uppercase version variable + **01.10.16:** Add TZ info to README. + **09.09.16:** Add layer badges to README. diff --git a/root/etc/cont-init.d/50-plex-update b/root/etc/cont-init.d/50-plex-update index 83c3944..2c181db 100644 --- a/root/etc/cont-init.d/50-plex-update +++ b/root/etc/cont-init.d/50-plex-update @@ -1,6 +1,4 @@ #!/usr/bin/with-contenv bash -# Check variable status -export VERSION=$(echo "$VERSION" | tr '[:upper:]' '[:lower:]') # copy config on first run, regardless of update status [[ ! -e /etc/default/plexmediaserver ]] && \ @@ -90,9 +88,9 @@ fi INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver) # start update routine -if [[ "$VERSION" = latest ]] || [[ "$VERSION" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then +if [[ "${VERSION,,}" = latest ]] || [[ "${VERSION,,}" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 ) -elif [[ "$VERSION" = public ]]; then +elif [[ "${VERSION,,}" = public ]]; then PLEX_TOKEN="" REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 ) else