Starting BF Server

Christopher Choo chrischoo at fragnetics.com
Tue Dec 24 23:32:37 EST 2002


Hi guys,

Merry Christmas to you all! A friend of mine wrote the following script to
keep a BF server running. At these stages of development it's important that
the BF server not be restarted in the event of persistent crashes. We had to
restart our Linux server (very bad cuz we are doing some webhosting as a
sideline) when the BF server crashed continually, flooded our log file, and
made itself defunct.

It was partly due to us logging whatever was happening, and the log file
grew too large and ate up the whole partition. This probably caused the BF
server to screw itself over and we were unable to kill the process (even
with all 20 kill signals). Anyway that was a previous patch and the
situation seems to have improved, but we're taking no chances :)

I personally don't have a copy of BF so running this server meant that we
had to pick up what we could from websites. Where would I go if I wanted to
read a few tutorials on Linux BF server management and how to remotely
configure/administer the server??

Anyway the script is as follows :

while true; do
  echo "starting bf server..."
  ./bf1942_lnxded > /dev/null 2> /dev/null
  echo "server crashed! waiting 10 seconds...."
  date >> crashes
  mail -s "bf server crash(es)" team < crashes
  sleep 1
  if [ -a crashes ] ; then
    if [ `cat crashes|wc -l` -gt 10 ] ; then
      break
    fi
  fi
done

mail -s "FATAL: too many bf server crashes, no more retries" team < crashes


Regards,
Chris




More information about the Bf1942 mailing list