-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautorun
executable file
·76 lines (61 loc) · 1.9 KB
/
autorun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh
cd /var/mud/PRODUCTION/mud
# The port on which to run the MUD
PORT=4000
# Default flags to pass to the MUD server (see running.doc for a description
# of all flags).
FLAGS='-q'
#############################################################################
while ( : ) do
# only turn on MALLOC_CHECK_ if you are debugging memory problems
MALLOC_CHECK_=2
export MALLOC_CHECK_
DATE=`date`
echo "autorun starting game $DATE" as `whoami`>> syslog
echo "running bin/fierymud $FLAGS $PORT" >> syslog
echo "MALLOC_CHECK=$MALLOC_CHECK_" >> syslog
chmod 660 lib/core.* > /dev/null 2>&1;
ulimit -c unlimited
bin/fierymud $FLAGS $PORT >> syslog 2>&1
tail -30 syslog > syslog.CRASH
# this is to generate the death counts.
# php "/home/fieryweb/www/death/proc_rip.php" >> syslog
sleep 5
# this will email users, to let tem know fiery has reset .
# php "/home/fieryweb/script/mailreset.php" >> 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 "new player" syslog >> log/newplayers
fgrep "ERR" syslog >> log/errors
fgrep "(GC)" syslog >> log/godcmds
fgrep "Bad PW" syslog >> log/badpws
fgrep "PFILEMAINT" syslog >> log/delete
fgrep "has connected" syslog >> log/logins
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 60
else
rm .fastboot
sleep 5
fi
if [ -r .killscript ]; then
DATE=`date`;
echo "autoscript killed $DATE" >> syslog
rm .killscript
exit
fi
while [ -r pause ]; do
sleep 60
done
done