Linux Server Restart Help
#1

Hey there, I've been trying to help a mate created a server restarter script, but as I have no experience with linux I have no idea why it isn't working.
This is what we have:

Код:
#!/bin/sh
log=samp.log
dat=`date`
samp="/home/SA-MP/MyServer/samp03/samp03svr"
cd /home/SA-MP/MyServer/samp03
 
echo "${dat} watchdog script starting." >>${log}
while true; do
    echo "${dat} Server exited, restarting..." >>${log}
    mv /home/SA-MP/MyServer/samp03/server_log.txt /home/SA-MP/MyServer/samp03/logs/server_log.`date '+%m%d%y%H%M%S'`
    ${samp} >> $log
	sleep 2
done
And i placed this script into my servers directory, And when i try to run the script this is the outcome:
Код:
> cd /home/SA-MP/MyServer/samp03
> nohup ./restart.sh &
nohup: cannot run command `./restart.sh': No such file or directory
Reply


Messages In This Thread
Linux Server Restart Help - by Gappy - 21.10.2009, 00:57
Re: Linux Server Restart Help - by Gappy - 21.10.2009, 21:12
Re: Linux Server Restart Help - by Gappy - 22.10.2009, 06:56
Re: Linux Server Restart Help - by Gappy - 22.10.2009, 07:54

Forum Jump:


Users browsing this thread: 1 Guest(s)