07.11.2013, 17:31
Umm... You need to be in the same directory where restart.sh is, or else you will get that warning.
PS: Try changing restart.sh to this:
PS: Try changing restart.sh to this:
Код:
#!/bin/sh
log=samp.log
dat=`date`
samp="/root/samp03/samp03svr"
cd /root/samp03
echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv /root/samp03/server_log.txt /root/samp03/logs/server_log.`date '+%m%d%y%H%M%S'`
${samp} >> $log
sleep 2
done

