mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-11 18:48:26 +00:00
Fix inverted root check
This commit is contained in:
parent
7c86d40eff
commit
bfe8c15238
@ -240,7 +240,7 @@ runAsRoot(){
|
||||
|
||||
# Check the user is not currently running this script as root
|
||||
if [ "$(id -u)" == "0" ]; then
|
||||
if [ "$1" != "--run-as-root-i-know-what-im-doing" ]; then
|
||||
if [ "$1" = "--run-as-root-i-know-what-im-doing" ]; then
|
||||
echo "Warning: running as root is dangerous" >&2
|
||||
elif [ "$1" = "--runfromroot" ]; then
|
||||
echo "Error: still running as root after attempting to drop privileges; aborting" >&2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user