Skip to content

Commit

Permalink
fix sudo detection
Browse files Browse the repository at this point in the history
  • Loading branch information
qtwrk committed Jan 13, 2020
1 parent 6ee6208 commit f6e4268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cyberpanel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export LC_CTYPE=en_US.UTF-8

SUDO_TEST=$(set)
DEV="OFF"
BRANCH="stable"
POSTFIX_VARIABLE="ON"
Expand Down Expand Up @@ -610,7 +611,7 @@ fi

check_root() {
echo -e "\nChecking root privileges...\n"
if echo $(set) | grep SUDO > /dev/null ; then
if echo $SUDO_TEST | grep SUDO > /dev/null ; then
echo -e "\nYou are using SUDO , please run as root user...\n"
exit
fi
Expand Down

0 comments on commit f6e4268

Please sign in to comment.