fix: run_as_root / run_as_steam arg count

This commit is contained in:
GenZmeY 2020-08-08 05:02:12 +03:00
parent 89e09826f7
commit 620f91e5e9
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ function run_as_steamuser () # $@: command
include "/etc/steamcmd/steamcmd.conf"
if [[ "$(whoami)" == "$SteamUser" ]]; then
shift 2; cmd_main "$@"
shift 3; cmd_main "$@"
elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]] || [[ "$(whoami)" == "root" ]]; then
export INC_LIBS=""
sudo -u "$SteamUser" "$@"
@ -76,7 +76,7 @@ function run_as_steamuser () # $@: command
function run_as_root () # $@: command
{
if [[ "$(whoami)" == "root" ]]; then
shift 2; cmd_main "$@"
shift 3; cmd_main "$@"
elif [[ -n $(groups "$(whoami)" | grep -Fo 'wheel') ]]; then
export INC_LIBS=""
sudo "$@"

View File

@ -67,7 +67,7 @@ function instance_add () # $*: InstanceName[s]
exit 1
elif ! server_exists; then
echo "You must install server first"
echo "Run \"$ScriptName --update\" to install it"
echo "Run \"$ScriptName game update\" to install it"
exit 1
fi
@ -132,7 +132,7 @@ function instance_add () # $*: InstanceName[s]
done
}
function instance_chat ()
function instance_chat () # $1: Message, $*: instance...
{
include "$LibDir/webadmin.lib"