Nee help with CentOS.
#1

I want to install a script that auto restarts my server if it goes offline.

I tride using https://sampwiki.blast.hk/wiki/Linux_Server#Method_2

But Something seems to be going wrong. I keep getting this error when i use nohup ./restart.sh &
Quote:

nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./restart.sh': No such file or directory

My restart.sh is as follows:
Quote:

#!/bin/sh
log=samp.log
dat=`date`
samp="/root/samp03"
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

My SAMP Directory on my VPS:



NOTES: I have the correct permissions set, the paths look alright, and yes i can start my server using ./samp03svr &

Any/all help would be GREATLY appreciated!
Reply


Messages In This Thread
Nee help with CentOS. - by RaiNyDayS - 07.11.2013, 14:08
Re: Nee help with CentOS. - by HyDrAtIc - 07.11.2013, 14:38
Re: Nee help with CentOS. - by RaiNyDayS - 07.11.2013, 16:17
Re: Nee help with CentOS. - by BlueBaron - 07.11.2013, 17:31
Re: Nee help with CentOS. - by RaiNyDayS - 07.11.2013, 17:51
Re: Nee help with CentOS. - by Mark™ - 07.11.2013, 17:58
Re: Nee help with CentOS. - by linuxthefish - 07.11.2013, 19:44
Re: Nee help with CentOS. - by FiReMaNStone - 07.11.2013, 20:23
Re: Nee help with CentOS. - by PakistaniBaba - 07.11.2013, 20:33
Re: Nee help with CentOS. - by RaiNyDayS - 07.11.2013, 21:28

Forum Jump:


Users browsing this thread: 3 Guest(s)