#!/bin/csh # # CircleMUD 2.0 autorun script # Originally by Fred C. Merkel # Copyright (c) 1993 The Trustees of The Johns Hopkins University # All Rights Reserved # See license.doc for more information # a few subtle mods for achipelago by Alastair Neil # If .fastboot exists, the script will sleep for only 5 seconds between reboot # attempts. If .killscript exists, the script commit suicide (and remove # .killscript). If pause exists, the script will repeatedly sleep for # 60 seconds and will not restart the mud until pause is removed. set PORT=2424 set FLAGS='-q' umask 22 limit coredumpsize 10000000 while (1) set DATE = (`date`); echo "autoscript starting game $DATE" >> syslog if (-r bin/test) then /bin/mv bin/test bin/archipelago endif bin/archipelago $FLAGS $PORT >>& syslog fgrep "self-delete" syslog >> log/delete fgrep "death trap" syslog >> log/dts fgrep "killed" syslog >> log/rip fgrep "Running" syslog >> log/restarts fgrep "advanced" syslog >> log/levels fgrep "equipment lost" syslog >> log/rentgone fgrep "usage" syslog >> log/usage fgrep "new player" syslog >> log/newplayers fgrep "SYSERR" syslog >> log/errors fgrep "(GC)" syslog >> log/godcmds fgrep "Bad PW" syslog >> log/badpws /bin/rm log/syslog.1 /bin/mv log/syslog.2 log/syslog.1 /bin/mv log/syslog.3 log/syslog.2 /bin/mv log/syslog.4 log/syslog.3 /bin/mv log/syslog.5 log/syslog.4 /bin/mv log/syslog.6 log/syslog.5 /bin/mv syslog log/syslog.6 touch syslog if (! -r .fastboot) then sleep 40 else /bin/rm .fastboot sleep 5 endif if (-r .killscript) then set DATE = (`date`); echo "autoscript killed $DATE" >> syslog /bin/rm .killscript exit endif while (-r pause) sleep 60 end end