Restart GameServers script
#1

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

#2
very helpful, thank you!

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

#4

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.



Forum Jump:


Users browsing this thread: 1 Guest(s)