From 3faf61d05d30217ead3aa6f5fbafc980d0c0b4d1 Mon Sep 17 00:00:00 2001 From: kokojop <127.0.0.73@gmail.com> Date: Tue, 15 Dec 2020 00:35:21 +0900 Subject: [PATCH] I think UID is better than "root" string. --- update.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/update.sh b/update.sh index c76f20bc..f300fd11 100755 --- a/update.sh +++ b/update.sh @@ -296,9 +296,7 @@ fi ################ # Got root? -myWHOAMI=$(whoami) -if [ "$myWHOAMI" != "root" ] - then +if (( $EUID != 0 )); then echo "Need to run as root ..." exit fi