problem with restart.sh
#1

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
Reply
#2

please help!
Reply
#3

Are you sure you are in right directory?
Have you

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


Forum Jump:


Users browsing this thread: 1 Guest(s)