Permission Denied, not for the people who can answer me though.
#1

Code:
Method 2
If you don't want to use crontab and if you want to have server log saved to a separate directory on server crash you can use this script.
To keep your server online using this script, first you need to stop your server and then execute it with this command:
nohup ./restart.sh &
restart.sh:
#!/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
This method will bring your server back up whenever it crashes or when the RCON exit command is issued. It will also save the server log into a separate directory.
This is the method im using to keep my server up 24/7 on my vps, now the problem is, in the ssh console, when i type "nohup ./restart.sh &" it gives me the message:

Code:
[1] 1771
[root@vps***** samp03]# nohup: appending output to `nohup.out'
nohup: cannot run command `./restart.sh': Permission denied
Anyone got a clue?
Reply


Messages In This Thread
Permission Denied, not for the people who can answer me though. - by Geso - 07.09.2010, 16:09
Re: Permission Denied, not for the people who can answer me though. - by Killerkid - 07.09.2010, 16:16
Re: Permission Denied, not for the people who can answer me though. - by Geso - 07.09.2010, 16:18
Re: Permission Denied, not for the people who can answer me though. - by Cool_Boy27 - 13.11.2010, 05:35

Forum Jump:


Users browsing this thread: 1 Guest(s)