[mohaa] linux auto reboot script

Ian Knight ian at 34sp.com
Wed Oct 8 04:09:33 EDT 2003


Terrain D wrote:

> I have a few mohaa servers online, and am looking for a script that 
> will auto reboot the server if it hangs, or if the server recieves an 
> rcon exit/quit.
>
> Is there such a script, I assume there must be, and where can I get it?
>
> Thanks peeps
>
>
To counteract the rcon quit you can just run the server in a loop

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cd /path/to/MOHaa
while true
do
./mohaa_lnxded +set fs_basepath ./ +set net_port 12203 +set 
net_gamespy_port 12205 +set com_zoneMegs 256 +set com_hunkMegs 56 +set 
vm_game 0 +set ttycon 0 +set dedicated 2 +exec server.cfg
echo "Server is down. Sleeping for 5 seconds...">&2
sleep 10
done
echo "Error: should never get here!">&2
exit 0
;;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hopefully that will get over that bit for you.

Ian







More information about the Mohaa mailing list