-
Notifications
You must be signed in to change notification settings - Fork 3
/
autorun.vmud
executable file
·39 lines (30 loc) · 1.03 KB
/
autorun.vmud
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
#!/bin/sh
# batch file for running Virtustan MUD and webclient
cd ~prool/proolmud
# PREsave syslog
mv syslog syslog-tail-`date "+%d-%m-%Y-%H-%M-%S"`
# run webclient
#websockify -D --log-file=webclient.log :3210 :3000
# run MUD in cycle
while [ 1 ]; do
date "+%d-%m-%Y %H:%M:%S VMUD start"
date "+%d-%m-%Y %H:%M:%S start" >> autolog.txt
# mail -s "VMUD start" proolix@gmail.com < letter.txt
# date "+%d-%m-%Y %H:%M:%S Virtustan MUD started" > ~/web/mud.kharkov.org/public_html/mudstat/vmud2.html
bin/vmud
date "+%d-%m-%Y %H:%M:%S exit" >> autolog.txt
date "+%d-%m-%Y %H:%M:%S exit"
# save syslog
mv syslog syslog-tail-`date "+%d-%m-%Y-%H-%M-%S"`
if [ -r .killscript ]; then
DATE=`date`;
echo "MUD shutdown $DATE" >> syslog
rm .killscript
# date "+%d-%m-%Y %H:%M:%S Virtustan MUD stopped" > ~/web/mud.kharkov.org/public_html/mudstat/vmud2.html
cp vmud0.html /var/www/mud.kharkov.org/mudstat/vmud2.html
exit
fi
# echo pause 6 sec begin
# sleep 6
# echo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
done