SA-MP Forums Archive
Keep server online sa-mp problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Keep server online sa-mp problem (/showthread.php?tid=333771)



Keep server online sa-mp problem - jcvag44800 - 12.04.2012

Hi guys.

I have a problem for keeping my samp server online.
This is the script:

startgtaserver.sh
Код:
#!/bin/bash
export GTA_PATH=/home/samp
cd $GTA_PATH
while [ true ]; do
cat {$GTA_PATH}/server_log.txt >> {$GTA_PATH}/full_server_log.txt
rm {$GTA_PATH}/server_log.txt
touch {$GTA_PATH}/server_log.txt
./samp03svr
done
gtaserver.sh
Код:
#!/bin/bash
 
server_start() {
screen /home/samp/startgtaserver.sh & # put in full path and name of startup script
} 
 
server_stop() {
killall startgtaserver.sh # your startup script name
killall samp03svr # need to put in path to killall if its not in $PATH
} 
 
server_restart() {
server_stop
sleep 1
server_start
}
case "$1" in
'start')
server_start
;;
'stop')
server_stop
;;
'restart')
server_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
But when I type the command gtaserver, it tells me it is incorrect ...
I'm on debian 6


Re: Keep server online sa-mp problem - linuxthefish - 12.04.2012

Screenshot of what happens?


Re : Keep server online sa-mp problem - jcvag44800 - 12.04.2012

-bash: gtaserver: command not found


Re : Keep server online sa-mp problem - jcvag44800 - 13.04.2012

up !


Re : Keep server online sa-mp problem - jcvag44800 - 15.04.2012

up !