[bf1942] 1.3 tomorrow and FAQs...
Cream[DONut]
cream at donut.dk
Mon Feb 10 02:43:00 EST 2003
It would generally be nice if the server came with a script to restart the
server on crashes
something like this i use:
#!/bin/bash
cd /home/bf/bf1942-lnxded-1.2beta1
failcount=0
while : ; do
start=`date '+%d%H%M%S'`
echo "bf started at $start" >>crash.log
./bf1942_lnxded
date >>crash.log
stop=`date '+%d%H%M%S'`
t=`expr $stop - $start`
if test 0 -le $t -a $t -lt 20 ; then
failcount=`expr $failcount + 1`
else
failcount=0
fi
if test $failcount -gt 5 ; then
exit 1
fi
sleep 3
done
# EOF
At 02:37 PM 2/9/2003 -0800, you wrote:
>--On Sunday, February 09, 2003 3:19 PM -0700 Scott Brooks <blaze at fragz.ca>
>wrote:
>
>>You should be able to add something along the lines of
>>QUERY_PORT=12345 ; /path/to/bf1942
>
>Try (assuming bash)
>
>export QUERY_PORT=12345
>/path/to/bf1942
>
>You could also put the port number in another config file:
>
>export QUERY_PORT=`cat /path/to/configfile`
>
>Or just make a config file with the one line:
>
>export QUERY_PORT=12345
>
>and then in the main script put:
>
>. /path/to/configfile
>
>(The "." makes the shell run the argument as if its contents were inline
>in the current file. That's how the stuff in /etc/sysconfig is typically
>loaded by the initscripts in /etc/rc.d/init.d.)
Cream[DONut] - www.donut.dk
www.nethouse2000.dk - admin
More information about the Bf1942
mailing list