PDA

View Full Version : Attention linux fans, a script for eqemu.


bot403
06-08-2002, 08:03 AM
I have created a script to keep eqemu up 24/7.
My script works like a init script, you call it like this
./startserver start
./startserver stop
./startserver status
Becuase you can edit it to specify your eqdirectory it *should* be able to be linked like an init script to have eqserer start at boottime;)

This script will
1)start the worldserver
2)start zoneservers ( by deafult this is 10, only because i have alot of memory in my machine, delete lines to suit you
3)check to see if the zoneservers are running, if they arent it will start them, if they are it will poll in another 10 seconds
4) check the world server, if the worldserver dies then it will clean up and kill any zoneservers, and then restart the world server and zone servers again.
YOU MUST SET THE VARIABLES at the top.

-scriptname is the name of the script, ex. startserver
-eqdir IS IMPORTANT, its the directory that eq is installed
-world is the name of the worldserver executable, normally world
pub_ip is your PUBLIC IP ADDRESS
-world_ip is the address of the worldserver, safe to be localhost and usually localhost
-zone is the name of the zoneserver executable, normally zone

This script has been tested to work on SuSE Linux 7, good luck with using it for youself. All i can say is its not guarenteed but it works for me:p
The attached file is named with a zip extension because of the forum limitations,but it is just the script. Rename it to startserver to use it.

bot403
06-13-2002, 12:36 PM
heres a minor update to my script that includes another variable so that you can start a specified # of zoneservers easily.

Soon to come- a better termination job, and im sorry, i lied, it cant be used as an init script yet because i forget about the special variables you have to return when starting scripts like that, however i will work on it sometime in the future.

bot403
06-20-2002, 01:34 PM
Heres the latest verion, i cleaned it up alot, this shoudl be ALOT better, but im going to leave the script like this. Use it if you'd like.

maybe suitable for an init script, but kinda dangerous at the moment, it might hang your boot, but your welcome to let me know.