Re: Kind of off-topic(autorun)

From: George (greerga@CIRCLEMUD.ORG)
Date: 03/15/98


On Sun, 15 Mar 1998, Jesper Andersen wrote:

>Im located on a server I dont have real access to. So I would love to know
>how you can change the autorun script to only boot the server at a max of
>5 per day, and then shutdown completely. Then I could add a mail-script
>that would mail the admins whenever the server crashes. But to prevent a
>spam-mail(when the server boots 1 billion time because of a error) I want
>to make sure the autorun quits when it has booted 5 times in one day.
>Anybody have any idea to how Im gonna make this? Im not that great to
>scripts.

I found the easiest method with crontab was to make the MUD touch() a
'.killcron' file while it booted.  Then when the bootup was successful, it
removes the '.killcron' file.  Thus, if there is a world error, '.killcron'
will remain and the script will notice that file is there and refuse to
restart the server.  Sort of like '.killscript' does for autorun although
you may get away with using '.killscript' as the file to check also.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST