Linux Server restarter
#1

Hi ppl,
I bought a VPS few days ago, I installed all updates, ftp client and some other things. Server works fine but I forgot to make server restarter in case of crash. So I went to wiki and found this code:
Quote:

#!/bin/sh
log=samp.log
dat=`date`
samp="/home/User/samp03/samp03svr"
cd /home/User/samp03/

echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv /home/User/samp03/server_log.txt /home/User/samp03/logs/server_log.`date '+%m%d%y%H%M%S'`
${samp} >> $log
sleep 2
done

But when I try to start this using nohup ./restarter.sh & I got an error No such file or directory.
Path is ok, I tested it with cd -l /home/user/samp03/
Is this something with libraries or I made a mistake somewhere??
Reply


Messages In This Thread
Linux Server restarter - by Unknownich - 26.03.2012, 08:54
Re: Linux Server restarter - by Riddy - 26.03.2012, 08:57
Re: Linux Server restarter - by Unknownich - 26.03.2012, 09:00
Re: Linux Server restarter - by VOXrr - 26.03.2012, 09:18
Re: Linux Server restarter - by Unknownich - 26.03.2012, 09:28
Re: Linux Server restarter - by Unknownich - 26.03.2012, 10:06
Re: Linux Server restarter - by Unknownich - 26.03.2012, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)