Files
TrinityCore/src/trinitycore/run-mangosd
XTZGZoReX cc2a089a9d * Trailing whitespace removed.
--HG--
branch : trunk
2009-04-06 21:14:51 +02:00

15 lines
339 B
Bash

#!/bin/bash
# Trinity Server
# autorestart Script
while :
do
echo "TrinityCore daemon restarted"
echo `date` >> crash.log &
./mangosd | tail -n 20 >> crash.log
echo " " >> crash.log &
pid=`ps ax | awk '($5 ~ /trinitycore/) { print $1 }'`
wait $pid
echo `date` ", TrinityCore daemon crashed and restarted." >> serverlog
done