pacify set -u
This commit is contained in:
parent
c4b9f374d7
commit
862bf66f20
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ SERVERBASE="$HOME/servers/$SERVER"
|
|||
[ -d "$SERVERBASE"/replays ] || mkdir "$SERVERBASE"/replays
|
||||
|
||||
shift
|
||||
if [ "$1" = "--test" ]; then
|
||||
if [ $# -ge 1 ] && [ "$1" = "--test" ]; then
|
||||
shift
|
||||
PARAMETERS="$@"
|
||||
cd "$SERVERBASE"/build || exit 1
|
||||
|
@ -62,7 +62,7 @@ do
|
|||
echo "started $SERVER server with command: 'wesnothd-$SERVER -c \"$SERVERBASE\"/wesnothd.cfg --port $PORT --threads $THREADS $PARAMETERS' (revision: $REV, pid: $PID) logging to: $LOG"
|
||||
# wait a bit in case the process dies immediately
|
||||
sleep 5
|
||||
if jobs 1
|
||||
if jobs 1 > /dev/null
|
||||
then # create some convenient links
|
||||
ln -s "$SERVERBASE/logs/$LOG" "$LOG.$PID"
|
||||
rm -f "$SERVERBASE"/old.log "$SERVERBASE"/old.pid
|
||||
|
|
Loading…
Add table
Reference in a new issue