LCKB
Restart GameServers script - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Off-Topic (The Outer World) (https://lckb.dev/forum/forumdisplay.php?fid=198)
+---- Forum: General Discussion (https://lckb.dev/forum/forumdisplay.php?fid=147)
+---- Thread: Restart GameServers script (/showthread.php?tid=1481)



- LikeToMove - 01-05-2013


Ok guys.. this little script will help you if you're not a fan of ps and kill commands...

go to root EP2 files directory and follow these simple steps:

 

gipi@sarasystems-net #: touch rgs

 

rgs

#!/bin/bash
while ( : ) do
PID=`ps -edf|grep GameServer_d|awk '{print $2}'`
echo "Finding GameServers..." >&2
sleep 2
echo "$PID" >&2
sleep 2
echo "Restarting Done!!" >&2
sleep 1
kill -9 $PID
exit
done

 

Now you can run ./rgs to restart all your gameserver processes.

I know, this is a very donkey script, so don't hate me

 

Regards




- Gambit - 01-06-2013

very helpful, thank you!




- Creep - 01-09-2013

does this restart the server if it crashes or when running on my command?




- LikeToMove - 01-09-2013


The start2 script (recalled from startScript.sh) restarts automatically the Gameserver(s) if they going down.

This simple script can help you if your server is in a dev stage and you need to restart gameserver(s) more times.