From 5ac1aec075b66981e21cc0307f88d957d7311ac0 Mon Sep 17 00:00:00 2001 From: martijndierckx Date: Sat, 13 Feb 2016 17:08:00 +0100 Subject: [PATCH] made root check case-insensitive running the script via sudo, kept returning the 'run as root' error. Reason: id returned 'UID=0(root) GID=0(root) groepen=0(root)', while the lower case version was expected --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 35ec95a..62aa46e 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -141,7 +141,7 @@ if [ "${EMAIL}" == "" -o "${PASS}" == "" ] && [ "${PUBLIC}" == "no" ]; then fi if [ "${AUTOINSTALL}" == "yes" -o "${AUTOSTART}" == "yes" ]; then - id | grep 'uid=0(' 2>&1 >/dev/null + id | grep -i 'uid=0(' 2>&1 >/dev/null if [ $? -ne 0 ]; then echo "Error: You need to be root to use autoinstall/autostart option." exit 1