From 3d5fd85f3cdf1dda1cdb57d0014fc6c73b00ce36 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Sun, 24 Jul 2016 05:38:27 +0100 Subject: [PATCH] add check line for download of plex on update --- root/etc/cont-init.d/30-plex-update | 3 ++- root/etc/cont-init.d/40-chown-files | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/30-plex-update b/root/etc/cont-init.d/30-plex-update index 3bdf1c6..ef3a085 100644 --- a/root/etc/cont-init.d/30-plex-update +++ b/root/etc/cont-init.d/30-plex-update @@ -67,7 +67,7 @@ fi last=130 if [[ "$VERSION" == "" ]]; then - echo "ERROR: No version found, running installed version $INSTALLED" + echo "VERSION variable not set, current installed version $INSTALLED" elif [[ "$VERSION" != "$INSTALLED" ]]; then echo "Upgrading from version: $INSTALLED to version: $VERSION" while [[ $last -ne "0" ]]; do @@ -75,6 +75,7 @@ elif [[ "$VERSION" != "$INSTALLED" ]]; then wget -P /tmp "https://downloads.plex.tv/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb" last=$? done + [[ ! -e /tmp/plexmediaserver_"${VERSION}"_amd64.deb ]] && exit 0 apt-get remove --purge -y plexmediaserver dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb else diff --git a/root/etc/cont-init.d/40-chown-files b/root/etc/cont-init.d/40-chown-files index 26405d3..71c1838 100644 --- a/root/etc/cont-init.d/40-chown-files +++ b/root/etc/cont-init.d/40-chown-files @@ -6,7 +6,8 @@ if [ ! -d "/config/Library" ]; then fi if [ ! -f "/config/Library/linuxserver-chown.lock" ]; then - find /config/Library ! \( -user abc -a -group root \) -print0 | xargs -0 chown abc:root + find /config/Library ! \( -user abc -a -group abc \) -print0 | xargs -0 chown abc:abc touch /config/Library/linuxserver-chown.lock + chown abc:abc /config/Library/linuxserver-chown.lock fi