mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
script simplification
Simplifying the script for later adding an exception for root to the server controller
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
CUR_USER=$(whoami 2> /dev/null || echo ~ | sed 's/.*\///');\
|
||||
echo $LANG | grep -qE "en_US.UTF-8|^C.UTF-8" || export LC_ALL=C;\
|
||||
if [ "$CUR_USER" = "root" ]; then command -v sudo > /dev/null 2>&1 && sudo -nu $CUR_USER sudo -n uname > /dev/null;\
|
||||
else groups $CUR_USER | grep -E "\<sudo\>|\<wheel\>" && sudo -nu $CUR_USER sudo -n uname > /dev/null; fi
|
||||
[ "$CUR_USER" = "root" ] || groups $CUR_USER | grep -E "\<sudo\>|\<wheel\>" && sudo -nu $CUR_USER sudo -n uname > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user