Can't keep server online
#1

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
Reply


Messages In This Thread
Can't keep server online - by jcvag44800 - 15.04.2012, 13:25
Re : Can't keep server online - by jcvag44800 - 15.04.2012, 15:17

Forum Jump:


Users browsing this thread: 1 Guest(s)