mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-27 08:48:27 +00:00
Abort if steamcmd_user is root
This commit is contained in:
parent
6e9167dcc9
commit
71b622ab40
@ -192,6 +192,9 @@ runAsRoot(){
|
|||||||
doUpgradeTools
|
doUpgradeTools
|
||||||
elif [ "$1" == "uninstall-tools" ]; then
|
elif [ "$1" == "uninstall-tools" ]; then
|
||||||
doUninstallTools
|
doUninstallTools
|
||||||
|
elif [ "$steamcmd_user" = "$USERNAME" ]; then
|
||||||
|
echo "Error: steamcmd_user is root; aborting"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
exec /sbin/runuser "$steamcmd_user" -s "$steamcmd_user_shellexec" -c "$(printf "%q" "$0")$(printf " %q" "$@")"
|
exec /sbin/runuser "$steamcmd_user" -s "$steamcmd_user_shellexec" -c "$(printf "%q" "$0")$(printf " %q" "$@")"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user