Skip to content

Commit f6e4268

Browse files
committed
fix sudo detection
1 parent 6ee6208 commit f6e4268

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cyberpanel.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
export LC_CTYPE=en_US.UTF-8
66

7+
SUDO_TEST=$(set)
78
DEV="OFF"
89
BRANCH="stable"
910
POSTFIX_VARIABLE="ON"
@@ -610,7 +611,7 @@ fi
610611

611612
check_root() {
612613
echo -e "\nChecking root privileges...\n"
613-
if echo $(set) | grep SUDO > /dev/null ; then
614+
if echo $SUDO_TEST | grep SUDO > /dev/null ; then
614615
echo -e "\nYou are using SUDO , please run as root user...\n"
615616
exit
616617
fi

0 commit comments

Comments
 (0)