Quote:
Originally Posted by Bigpull
Putting this here so they don't get lost in the shuffle again
emuStart
Code:
#!/bin/sh
WORLD=Change world ip/host
ZONE=Change to zone ip/host
mkdir -p logs 2>&1 > /dev/null
#mini#if [ ! -e .lock-login ] ; then
#mini# touch .lock-login
#mini# wine ./MiniLogin.exe > ../logs/login & )
#mini# sleep 30
#mini#fi
export LD_LIBRARY_PATH=`pwd`
if [ ! -e .lock-world ] ; then
touch .lock-world
./world 2>&1 > logs/world &
# slow servers
#sleep 5
fi
if [ ! -e .lock-zones ] ; then
# Static zones
touch .lock-zones
./zone qeynos $ZONE 7995 $WORLD 2>&1 > logs/qeynos.log &
./zone cshome $ZONE 7996 $WORLD 2>&1 > logs/cshome.log &
fi
#dynamic zones using ports given on command line
if [ foo"" != foo"$1" ] ; then
for i in "$@" ; do
./zone . $ZONE $i $WORLD 2>&1 > logs/zones &
done
fi
emuStop
Code:
#!/bin/sh
killall Andune.world Andune.zone
sleep 5
killall -9 world zone
sleep 5
./cleanipc
rm -f .lock-zones .lock-world .lock-login
|
Suggestions:
1) augment the LD_LIBRARY_PATH instead of replacing it.
2) instead of merely backgrounding the important jobs, signal them nohup so that they continue running after you logout. Alternatively, use the nohup program to launch them, as it makes very nice logs, too.
Alternatively, you could setup intetd/xinetd/etc to run the servers. It is a _really_ classy way to do so, and very easy to setup. You would probably want to disable world's from attempting to restart zones, though, since inetd would handle it.