Auto server restart.
-
chrrox
- Content Designer
- Posts: 177
- Joined: Wed Oct 17, 2007 8:12 pm
Auto server restart.
I don't know how hard this would be but is it possible to have the server restart if it crashes like have an separate launcher or something?
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
-
Riven
- Retired
- Posts: 113
- Joined: Thu Aug 30, 2007 3:11 am
- Location: Spain
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
For Linux, you could rob some concepts from EQEmu scripting. They use a start command that sets a drop file, then calls "persist_world".
persist_world script:
This will run World, then wait to see if .world_shutdown file appears, and if so, exits this script. If a crash is detected, it will log it to "crashlog".
You start persist_world with:
You stop persist_world with:
Or some variation of this. The same could be true of MS-DOS/Windows systems. Just write 2 bat files, one that writes a temp file, then loops until another temp file is detected. If shutdown is not detected, it must be a crash, so goto launch and start again. If someone else hasn't made a DOS bat later, I'll try and create one. But I use Linux, so that's what I posted. 
*Note these are directly hijacked from my EQEmulator, which I took from EQEmu wiki and modified.
persist_world script:
Code: Select all
#!/bin/sh
ulimit -c 99999999
while true
do
./world "$@"
if [ -r ".world_shutdown" ]; then
exit 0
fi
echo `date` "World crashed." >>crashlog
sleep 2
doneYou start persist_world with:
Code: Select all
if [ ! -e .lock-world ]
then
# Create a new .lock-world marker, and launch the persist_world script (keeps world alive if it crashes)
touch .lock-world
./persist_world 2>&1 > logs/world &
sleep 5
fiCode: Select all
touch .world_shutdown
rm -f .lock-world*Note these are directly hijacked from my EQEmulator, which I took from EQEmu wiki and modified.
-
Cadimiom
- Team: Zombie
- Posts: 74
- Joined: Wed Jul 25, 2007 2:31 pm
In Windows you just have a .bat file with this:
Just put the .bat file in the same directory and set the worlddebug.exe to your executable for eq2emu
Code: Select all
:LOOP
call WorldDebug.exe
goto LOOP
Who is online
Users browsing this forum: No registered users and 0 guests