Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- log=samp.log
- dat=`date`
- samp="/root/samp/samp01/samp03svr"
- cd /root/samp/samp01/
- echo "${dat} watchdog script starting." >>${log}
- while true; do
- echo "${dat} Server exited, restarting..." >>${log}
- mv /root/samp/samp01/server_log.txt /root/samp/samp01/logs/server_log.`date '+%m%d%y%H%M%S'`
- ${samp} >> $log
- sleep 2
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement