By dooomer
Date: 07-16-2008
JKA linux server restart script
Maded by Defender 2008
dungan_idaho@hotmail.com
Fixed and Mixed information from linux forums
now works with linux jka servers.
--------------------------------------------------------------
In Linux you have home folder where you may create 'allies'
own customized commands and scripts.
Its the 'bin' folder.
homemainuserbin
create it if don't exist, copy files or/and folder there
and edit for your own use.
put both files in homemainuserbin
or copy this bin folder with files into your home folder.
Then go chmod them:
cd bin
chmod 755 jka
chmod 755 jkastart
Ok. Simple what they do:
1) 'jkastart' script simple opens screen 'jka110' and starts script 'jka' in it.
2) 'jka' script has specified commands for linuxjampded +set fs_game base example.
In 'jka' script is while loop in it,
if process fails it will relaunch
same 'jka' script again in same screen.
Server restarts.
Basically works with any servers.
file name : jkastart
screen -dmS jka110 jka
#### screen -dmS jka110 jka .. opens 'jka' script into screen named 'jka110'
#### --> more easy then see in 'screen -ls' what to kill when needed
#### restarts server into this one screen when jka crashed
file name : jka
!#/bin/bash
while [ "1" ]; do
cd /mnt/linux/JKA110 ####here is location of you jka installation
&&./linuxjampded +set dedicated 2 +set net_port 29070 +set fs_game base +set com_hunkmegs 64 +exec server.cfg
done;
screen -dmS jka110 jka
####When jka server is 'closed', crashed in this screen where we opened this script
####--with jkastart script, this does same as loop.
####When process is crashed, it restarts it into same screen 'jka110'
----------------------------------------------------
Thank you.