12-09-2013, 03:25 PM
In .rs.sh i have this:
#!/bin/bash
while ( : ) do
DATE=`date`
if [ -r .shutdown ]; then
rm -f .shutdown
fi
gdb --batch --command=cmd ./GameServer_d > "bt_`date +%y%m%d%H%M%S`.log"
DATE2=`date`
if [ -r .shutdown ]; then
echo "***** Shutdown $DATE ~ $DATE2" >> rebootlog
exit
fi
echo "!!!!! Reboot $DATE ~ $DATE2" >> rebootlog
sleep 2
done

