From 69915cd5395a6a8edba9419a553b4609bd9ffbfc Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Fri, 18 Jan 2008 09:34:00 +0000 Subject: [PATCH] make it possible to provide additional parameters for wesnothd... ...on the commandline --- utils/mp-server/run_server | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils/mp-server/run_server b/utils/mp-server/run_server index 8953ec67d60..42535481888 100755 --- a/utils/mp-server/run_server +++ b/utils/mp-server/run_server @@ -1,10 +1,12 @@ #!/bin/sh -if [ $# -ne 1 ]; then - echo "Syntax: $0 " +if [ $# -lt 1 ]; then + echo "Syntax: $0 []" exit 1 fi SERVER=$1 +shift +PARAMETERS=$* SERVERBASE=$HOME/servers/$SERVER SOURCE=$HOME/source/trunk case $SERVER in @@ -32,7 +34,7 @@ do REV=$(ls -l $SERVERBASE/build | sed -e 's,.*wesnothd-\(svn-.*\)_.*/,\1,') cd $SERVERBASE/build || exit 1 [ -x bin/wesnothd-$SERVER ] || exit 1 - nice -n 3 bin/wesnothd-$SERVER -c $SERVERBASE/wesnothd.cfg --port $PORT --threads 30 > $SERVERBASE/logs/wesnothd.$DATE.$REV.log 2>&1 & + nice -n 3 bin/wesnothd-$SERVER -c $SERVERBASE/wesnothd.cfg --port $PORT --threads 30 $PARAMETERS > $SERVERBASE/logs/wesnothd.$DATE.$REV.log 2>&1 & PID=$! echo -n "started $SERVER server (revision: $REV, pid: $PID) at: "; date cd $SERVERBASE