[bf1942] Killer Camera?

James Gurney james at globalmegacorp.org
Thu Mar 18 17:29:38 EST 2004


On 3/18/2004 2:19 PM, Brigham Stevens wrote:
> The server clobbers it's own settings on map change.
> If you time it right, you can get away with editing, waking the server, and
> restarting.

I work around this by having a seperate folder for new settings. My 
auto-restart script checks this folder for changes, and copies in the 
new files. Given the fact that the server crashes 3 or 4 times a day, 
this means that the new config goes in pretty quickly. Script is below, 
if anyone else wants it (this was based on someone elses restart script 
from ages ago).

James


#!/bin/bash
cd /home/dc/bf1942
#ulimit -c unlimited
failcount=0
while : ; do
         start=`date '+%d%H%M%S'`
         echo "bf started at $start" >>bf.log
         if [ -a /home/dc/newsettings/copy ]; then
                 /bin/cp /home/dc/newsettings/*.con 
/home/dc/bf1942/mods/bf1942/settings/
                 /bin/rm /home/dc/newsettings/copy
         fi

         ./bf1942_lnxded +statusMonitor 1
         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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3198 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://icculus.org/pipermail/bf1942/attachments/20040318/05b91b3f/attachment.bin>


More information about the Bf1942 mailing list