#!/bin/sh
#
# 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
# 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=4000
set FLAGS = '-m -q'
while [ 1 ]
do
set DATE = `date`
echo "autoscript starting game $DATE" >> syslog
nohup bin/circle $FLAGS $PORT 1> syslog 2>&1
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
rm log/syslog.1
mv log/syslog.2 log/syslog.1
mv log/syslog.3 log/syslog.2
mv log/syslog.4 log/syslog.3
mv log/syslog.5 log/syslog.4
mv log/syslog.6 log/syslog.5
mv syslog log/syslog.6
touch syslog
if [ ! -r .fastboot ]
then
sleep 40
else
rm .fastboot
sleep 5
fi
if [ -r .killscript ]
then
set DATE = `date`
echo "autoscript killed $DATE" >> syslog
rm .killscript
exit
fi
while [ -r pause ]
do
sleep 60
done
done
This archive was generated by hypermail 2b30 : 12/07/00 PST