Automatically su to steamcmd_user if run as root

This commit is contained in:
Ben Peddell 2015-09-24 09:22:33 +10:00
parent a307643e90
commit 1505aa85ab

View File

@ -94,16 +94,7 @@ runAsRoot(){
elif [ "$1" == "uninstall-tools" ]; then
doUninstallTools
else
echo -n "arkmanager v${arkstVersion}: "
if [ $# -eq 0 ]; then
echo "no command specified"
else
echo "unknown command '$1' specified"
fi
echo -e "Usage: arkmanager [OPTION]\n"
echo "Option Description"
echo "upgrade-tools Check for a new ARK Server Tools version and upgrades it if needed"
echo "uninstall-tools Uninstall the ARK Server Tools"
su "$steamcmd_user" -c "$(printf "%q" "$0")$(printf " %q" "$@")"
exit 1
fi
}