From 533b59d3675c192aafce5f230daf4d1f669c620e Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 29 Nov 2016 19:52:09 -0800 Subject: [PATCH] Random cleanup --- plexupdate.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index b2e263b..fa568c4 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -361,11 +361,8 @@ elif [ ! -z "${EMAIL}" ] && [[ "$EMAIL" == *"@"* ]] && [[ "$EMAIL" != *"@"*"."* fi -if [ "${AUTOINSTALL}" = "yes" -o "${AUTOSTART}" = "yes" ]; then - if [ ${EUID} -ne 0 ]; then - error "You need to be root to use AUTOINSTALL/AUTOSTART option." - exit 1 - fi +if [ "${AUTOINSTALL}" = "yes" -o "${AUTOSTART}" = "yes" ] && [ ${EUID} -ne 0 ]; then + error "You need to be root to use AUTOINSTALL/AUTOSTART option." fi @@ -533,7 +530,7 @@ fi # By default, try downloading SKIP_DOWNLOAD="no" -# Installed version detection (only supported for deb based systems, feel free to submit rpm equivalent) +# Installed version detection if [ "${REDHAT}" != "yes" ]; then INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*') else