Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc/hosting/linux_scripts/common.sh: support compound commands like "snap run warzone2100" #3984

Merged
merged 8 commits into from
Jul 7, 2024
8 changes: 4 additions & 4 deletions doc/hosting/linux_scripts/common.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash -e
#!/bin/bash

function check {
if [ ! $(command -v netstat) ] && [ ! $(command -v ss) ]; then
echo "[ERROR] netstat or ss is required to check for available ports"
exit 1
fi
if [ ! $(command -v $wz2100cmd) ]; then
echo "[ERROR] Cannot execute \"$wz2100cmd\"."
if [ ! -v wz2100cmd ]; then
echo "[ERROR] wz2100cmd variable is not set."
exit 1
fi
if [ "$players" == "" ] || [ ! $players -gt 0 ]; then
Expand Down Expand Up @@ -76,5 +76,5 @@ function run_host {
configdir="--configdir=$cfgdir"
fi
# Run game
$wz2100cmd $configdir --autohost=$hostfile --gameport=$port --startplayers=$players --enablelobbyslashcmd $admcmd --headless --nosound
exec $wz2100cmd $configdir --autohost=$hostfile --gameport=$port --startplayers=$players --enablelobbyslashcmd $admcmd --headless --nosound
}
2 changes: 1 addition & 1 deletion doc/hosting/linux_scripts/config_sample.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

## Common configuration values
## This file is shared between all games
Expand Down
2 changes: 1 addition & 1 deletion doc/hosting/linux_scripts/game_sample.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash

## Game configuration values
## One file for each game type
Expand Down
Loading