Subject: Re: Radius (Livingston) on NetBSD
To: None <port-i386@NetBSD.ORG>
From: Simon J. Gerraty <sjg@quick.com.au>
List: port-i386
Date: 04/27/1997 23:22:01
Andrew Brown writes:
>would anyone be interested in adding a cute little respawning daemon
>to the tree?  something that runs a program and then starts it again
>when it dies?

If look at my APC UPS monitor (http://www.quick.com.au/sjg/apcmon.html)
the driver script is a thing called gend.sh which is a generic
"daemon" script.  I use it for things that I want running nearly all
the time.  You just provide it with an include file that does what you
want, and it takes care of ensuring only one copy running as well as
looking for restart, lock and stop files.

Then I just have cron start the thing every hour or whatever, and if
it is already running the new guy just exits quietly.

I use it for all sorts of things apart from monitoring my UPS.

--sjg