Make --threads optional
This commit is contained in:
parent
c8b12c0902
commit
f3c963ca00
1 changed files with 8 additions and 10 deletions
|
@ -26,29 +26,27 @@ if [ $# -ge 1 ] && [ "$1" = "--test" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
THREADS=4
|
||||
PORT=15000
|
||||
case $SERVER in
|
||||
1.4|1.8)
|
||||
PORT=14998
|
||||
THREADS=8 ;;
|
||||
set -- --threads 8;;
|
||||
1.6) PORT=14999
|
||||
THREADS=8 ;;
|
||||
set -- --threads 8;;
|
||||
1.5*) PORT=14999
|
||||
THREADS=16 ;;
|
||||
set -- --threads 16;;
|
||||
1.7*) PORT=14997
|
||||
THREADS=16 ;;
|
||||
set -- --threads 16;;
|
||||
1.9*|1.10*)
|
||||
PORT=14996
|
||||
THREADS=8 ;;
|
||||
set -- --threads 8;;
|
||||
1.12*)
|
||||
THREADS=30 ;;
|
||||
set -- --threads 30;;
|
||||
1.14*)
|
||||
set -- --keepalive ;;
|
||||
1.16*)
|
||||
set -- --keepalive ;;
|
||||
1.13*|trunk)
|
||||
# TODO: loonycyborg wants to test this with asio builds
|
||||
set -- --keepalive ;;
|
||||
esac
|
||||
|
||||
|
@ -70,9 +68,9 @@ do
|
|||
#REV=r$(echo $BUILDDIR | sed -nre "s,.*wesnothd-svn-([0-9:SM]+)_$SERVER$,\1,p")
|
||||
REV=${BUILDDIR#*wesnothd-*-git-}
|
||||
LOG="wesnothd.$DATE.$REV.log"
|
||||
bin/wesnothd-$SERVER -c "$SERVERBASE"/wesnothd.cfg --port "$PORT" --threads "$THREADS" "$@" > "$SERVERBASE/logs/$LOG" 2>&1 &
|
||||
bin/wesnothd-$SERVER -c "$SERVERBASE"/wesnothd.cfg --port "$PORT" "$@" > "$SERVERBASE/logs/$LOG" 2>&1 &
|
||||
PID=$!
|
||||
echo "started $SERVER server with command: 'wesnothd-$SERVER -c \"$SERVERBASE\"/wesnothd.cfg --port $PORT --threads $THREADS $*' (commit: $REV, pid: $PID) logging to: $LOG"
|
||||
echo "started $SERVER server with command: 'wesnothd-$SERVER -c \"$SERVERBASE\"/wesnothd.cfg --port $PORT $*' (commit: $REV, pid: $PID) logging to: $LOG"
|
||||
# wait a bit in case the process dies immediately
|
||||
sleep 5
|
||||
if ps -p $PID > /dev/null 2>&1
|
||||
|
|
Loading…
Add table
Reference in a new issue