Skip to content

Commit

Permalink
doc/hosting/linux_scripts/common.sh: support compound commands like "…
Browse files Browse the repository at this point in the history
…snap run warzone2100" (#3984)
  • Loading branch information
johan-boule authored Jul 7, 2024
1 parent e7b89bc commit 6a5f043
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 6a5f043

Please sign in to comment.