Hi there,<br>
<br>
check out the tool kkrcon (<a href="http://kkrcon.sourceforge.net/">http://kkrcon.sourceforge.net/</a>) and this script.<br>
<br>
I'm not using it, just found it once and thought it might come in handy some time...<br>
Hope it helps.<br>
<br>
#!/bin/sh<br>
tf1="temp1"<br>
kkrcon.pl -a instertserverip -p insertserverport -t old insertrconpassword status > $tf1<br>
<br>
# total number of lines in output<br>
tnl=`wc $tf1 | awk '{print $1}' `<br>
<br>
# tnl=1 - server doesnt respond. crash/wrong ip/port<br>
# tnl=2 - bad password<br>
# tnl=5 - server empty<br>
<br>
if [ "$tnl" -le 1 ]; then<br>
sleep 30<br>
# lets try again, in case server was restarting map<br>
kkrcon.pl -a insertserverip -p insertserverport -t old insertrconpassword status > $tf1<br>
tnl=`wc $tf1 | awk '{print $1}' `<br>
<br>
if [ "$tnl" -le 1 ]; then<br>
# no. server is really down<br>
serverpid=`ps auxw | grep serverstartfilenamehere | grep -v grep | awk '{print $2}'`<br>
<br>
if [ -z "$serverpid" ]; then<br>
cd /serverstartupfolderhere<br>
./serverstartcommandlinehere<br>
<br>
else<br>
<br>
kill $serverpid<br>
sleep 10<br>
cd /serverstartupfolderhere<br>
./serverstartcommandlinehere<br>
<br>
fi<br>
fi<br>
fi<br>
#EOF <br>