On Thu, Apr 11, 2002 at 06:53:19PM -0500, Daniel J. Rychlik wrote: > I have a mud game that runs on a Debian's system running the 2.2 kernel. > Occasionally the mud game crashes and stops accepting connections. I > have to manually log in to restart the game. I am wandering if there is > a way (which I am sure there is) to automatically restart the mud after > it crashes. Is their a way to write a script that monitors the behavior > of the pid or some other kind of process that it runs from to check for > either yes its running or no its not? I have honestly looked at trying > to find an answer for myself and my problem, but I need to be pointed in > the right direction. Any information would helpful.
Merc muds come with a shell script (csh, for some reason) that is merely a loop around the mud running, with a check for a shutdown.txt file being created (which the mud does on, well, shutdown, as a signal to the script) as well as cycling through log files. I use a perl script that does much the same thing, but also kills the MUD if it hasn't seen any log output in 3 minutes, under the assumption that the MUD is stuck in a loop. (Yeah, yeah, I should make it set an alarm() and use that like a watchdog timer in the MUD itself, but I wrote this hack years and years ago and I'm too lazy to do it the 'right' way now. :)) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]