Subject: Re: Starting jobs from init
To: Giles Lean <giles@nemeton.com.au>
From: Paul Newhouse <newhouse@rockhead.com>
List: netbsd-help
Date: 03/29/2002 15:11:19
> 
> > > 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.

That's essentially what I do now from rc.local.

Paul

> 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.