28.05.2014, 00:15
hello! wish you could help me in the consule 'PuTTY' error.
my code:
I am using method 2 of the link below.
https://sampwiki.blast.hk/wiki/Linux_Ser..._Server_Online
PHP код:
root@PlayVirtualReality:~# cd samp
root@PlayVirtualReality:~/samp# cd samp03
root@PlayVirtualReality:~/samp/samp03# nohup ./restart.sh &
[1] 27278
root@PlayVirtualReality:~/samp/samp03# nohup: ignoring input and appending output to `nohup.out'
nohup: failed to run command `./restart.sh': Permission denied
PHP код:
#!/bin/sh
log=samp.log
dat=`date`
samp="/root/samp/samp03/samp03svr"
cd /root/samp/samp03
echo "${dat} watchdog script starting." >>${log}
while true; do
echo "${dat} Server exited, restarting..." >>${log}
mv /root/samp/samp03/server_log.txt /root/samp/samp03/scriptfiles/Logs/server_log.`date '+%m%d%y%H%M%S'`
${samp} >> $log
sleep 2
done
https://sampwiki.blast.hk/wiki/Linux_Ser..._Server_Online