15.04.2012, 13:25
Hi guys.
I have a problem for keeping my samp server online.
This is the script:
startgtaserver.sh
gtaserver.sh
But when I type the command gtaserver, it tells me it is incorrect ...
I'm on debian 6
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
Код:
#!/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
I'm on debian 6