14.12.2010, 18:12
dear people,
I want to use this to restat my serve when it's crashed:
#!/bin/sh
log=samp.log
dat=`date`
samp="/path/to/samp/server/samp03svr"
cd /path/to/samp/server
echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv /path/to/samp/server/server_log.txt /path/to/samp/server/logs/server_log.`date '+%m%d%y%H%M%S'`
${samp} >> $log
sleep 2
done
but when I typ nohub ./restart.sh & it says: nohup: cannot run command `./restart.sh': No such file or directory
What did I wrong?
please responde,
Team Ice Cold
I want to use this to restat my serve when it's crashed:
#!/bin/sh
log=samp.log
dat=`date`
samp="/path/to/samp/server/samp03svr"
cd /path/to/samp/server
echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv /path/to/samp/server/server_log.txt /path/to/samp/server/logs/server_log.`date '+%m%d%y%H%M%S'`
${samp} >> $log
sleep 2
done
but when I typ nohub ./restart.sh & it says: nohup: cannot run command `./restart.sh': No such file or directory
What did I wrong?
please responde,
Team Ice Cold