Subject: Re: Starting jobs from init
To: Paul Newhouse <newhouse@rockhead.com>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-help
Date: 03/30/2002 09:54:32
> > you want to use pkgsrc/sysutils/daemontools package or something
> > similar.
> 
> AH!! Might just be what I was looking for.

Or even this, if you have a buggy daemon that exits from time to time:

#! /bin/sh

while :
do
    "$@"
    sleep 2
done

Call the script with the appropriate arguments and you're done.
Another alternative is a cron job that checks that a service is
running and restarts it if not.

The daemontools package is useful -- I use it for a bunch of services
that need log file management and starting and stopping from time to
time.  But it's overkill just to ensure that a daemon gets restarted
if it quits.

Regards,

Giles