egads, I'm starting to understand that gibberish... woot!<br><br>Thanks much!<br><br>Dave<br><br><b><i>Walker <walkertje@gmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 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> </blockquote><br><p>
                <hr size=1>Do you Yahoo!?<br> Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/handraisers"> all-new Yahoo! Mail Beta.</a>