ackfuss-4.3.2/area/boards/
ackfuss-4.3.2/npcs/a/
ackfuss-4.3.2/npcs/b/
ackfuss-4.3.2/npcs/c/
ackfuss-4.3.2/npcs/d/
ackfuss-4.3.2/npcs/e/
ackfuss-4.3.2/npcs/f/
ackfuss-4.3.2/npcs/h/
ackfuss-4.3.2/npcs/i/
ackfuss-4.3.2/npcs/k/
ackfuss-4.3.2/npcs/l/
ackfuss-4.3.2/npcs/n/
ackfuss-4.3.2/npcs/o/
ackfuss-4.3.2/npcs/p/
ackfuss-4.3.2/npcs/r/
ackfuss-4.3.2/npcs/s/
ackfuss-4.3.2/npcs/w/
ackfuss-4.3.2/player/c/
ackfuss-4.3.2/reports/
#!/bin/sh
#
# /bin/sh replacement for startup, by Spectrum
#

# grab the port number
port=3000
if [ "$1" != "" ]; then port=$1; fi

# set up
cd ../reports
if [ -f shutdown.txt ]; then rm -f shutdown.txt; fi

cd ../area

# allow cores
#ulimit -c 50000
# stack limit
#ulimit -s 1500

renice +5 -p $$

# loop indefinately
while :
do
  # find a logfile

  index=1000
  while :
  do
    logfile=../log/$index.log
    if [ ! -e $logfile ]; then break; fi
    let index=$index+1
  done

  # run the mud
  ../src/ack $port >$logfile 2>&1

  # shutdown?

cd ../reports

  if [ -e shutdown.txt ]; then
    echo "startup: shutting down" >>$logfile
    exit 1
  fi

cd ../area
  
  # sleep, so if we fail on boot we don't get massive looping
  sleep 10
done