SA-MP Forums Archive
problem with restart.sh - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: problem with restart.sh (/showthread.php?tid=199180)



problem with restart.sh - teamicecold - 14.12.2010

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


Respuesta: problem with restart.sh - jurgen - 29.01.2011

please help!


Re: problem with restart.sh - Ironboy500[TW] - 30.01.2011

Are you sure you are in right directory?
Have you

Код:
cd /path/to/your/SAMP/server
before running that command?