[mohaa] console reattatch

Ryan C. Gordon icculus at clutteredmind.org
Sat Jul 20 07:15:17 EDT 2002


> Thn y'all - very informative learnt a few things. now i need to learn
> how to write a restarting script...  anyone got a faq on that :) Damon

Put this into start_server.sh:

#!/bin/sh

while true
  do
    echo "MOHAA server coming up..."
    /where/i/installed/mohaa/mohaa_lnxded {...set command options here...}
    echo "MOHAA server has gone DOWN."
    sleep 5
  done


(Edit that to fit your needs...)

Then run chmod a+x start_server.sh so the file is executable.


Run the script, which will run the game. If the game crashes, or you
shutdown the game server, the script will sit there for five seconds and
then restart it.

The five seconds is to give you an idea of what's happening if the thing
is crashing contiunually, and so you can CTRL-C out of the script if you
legitimately took the server down with a "quit" at the console.

--ryan.






More information about the Mohaa mailing list