Server starter and crash checker for Jedi Knight: Jedi Academy V3.02. (Linux Version).
Now all MODs versions and base supported.
Description: The script will both start and check if the server has crashed, using process status and/or UDP status as triggers.
This script uses the unix util PS and/or NMap (www.nmap.org) to check for the process status or UDP status. If
you have root access, you can choose to use the NMap UDP check. If you are just a normal user you will have to use the
PS process status check.
Dynamic Rotation description:
Dynamic Rotation is a way to make several different rotations in each day of the week, to a total of seven.
By using this method the server becomes a lot more dynamic, and can help in MODs where rotation is unstable and can crash the server, making it possible
for maps at the end of the rotation to be more played in other days if set to a upper layer.
Rotations for each day can be set in the drotation.cfg file.
To set the Dynamic Rotation feature, check script.cfg.
Obs: Server.cfg must be edited with the removal of the current rotation and the vstr starting the first map, like vstr d1.
V3.00 now includes an updater. The updater can be set to autodownload patched scripts, and required files, or to only show the mirrors where the full
version can be download.
To set the autodownload feature, check script.cfg.
To execute the updater, run updater.sh.
1) Unpack the file linuxjascriptv302.tar.gz to any folder. (tar -xzvf linuxjascriptv302.tar.gz)
2) Check script.cfg and configure it. (All lines are described for what you need to set.)
2a) Check drotation.cfg and configure it if you have Dynamic Rotation enabled.
3) Now you have the option of either running it on crontab (for box reboot/shutdown purpose) or running without it.
3a) For crontab, add the following line to your user crontab table, in this case an one minute check (crontab -e. Remember, if you are using nmap you
must put the script in the root table): */1 * * * * /"dir"/crontabjka.sh (do not forget to give execute permission to crontabjka.sh by typing chmod +x crontabjka.sh).
3b) Without crontab simply give execute permission to jkascript.sh (chmod +x jkascript.sh) and execute the file (./jkascript.sh).
OBS: You can use jkascript.sh to both start and stop the script and server, make sure to type ./jkascript.sh help.
Changes from V1 to V2:
Added a single configuration file, you no longer have to check all the scripts.
Added comments in all areas for easy understanding.
Added the option of changing between NMap (UDP) and PS (process) check methods.
Changes from V2 to V3.00:
Support for all versions added.
Most lines have been either cleaned or optimized, error check for wrong values also has been added.
Dynamic Rotation added.
Changes from V3.00 to V3.01:
The code has been further cleaned and optimized.
All error checks with the exception of autodownload and server.cfg, have been migrated to the master script.
All error checks have been improved.
Added some echo messages for better interpretation in the stdout.
Added a start/stop script.
Changes from V3.01 to V3.02:
Fixed a bug added by V3.01 preventing the use of NMap check method.
Check for directory, user, id, and method user limitation check errors added to the master script.
CFG files are now stored at the cfg folder, while previous version files after auto update are stored in the old folder.
Code for the updater has been further improved.
Thanks to: (People who helped me at some point)
* Cthulhu@GBITnet.com.br / 2010 Â©