Abort if steamcmd_user is root

This commit is contained in:
Ben Peddell 2020-03-21 07:56:35 +10:00
parent 6e9167dcc9
commit 71b622ab40

View File

@ -192,6 +192,9 @@ runAsRoot(){
doUpgradeTools
elif [ "$1" == "uninstall-tools" ]; then
doUninstallTools
elif [ "$steamcmd_user" = "$USERNAME" ]; then
echo "Error: steamcmd_user is root; aborting"
exit 1
else
exec /sbin/runuser "$steamcmd_user" -s "$steamcmd_user_shellexec" -c "$(printf "%q" "$0")$(printf " %q" "$@")"
exit 1