Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2003 08:41:05 +0800
From:      <chael@southgate.ph.inter.net>
To:        "Chuck Swiger" <cswiger@mac.com>, "David Banning" <david+dated+1063050181.812806@skytracker.ca>
Cc:        questions@freebsd.org
Subject:   Re: how to run a program as a daemon
Message-ID:  <005101c3727d$39392270$fe01a8c0@JMICH>
References:  <20030903194259.GA23225@skytrackercanada.com> <3F564740.5050704@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I had the same problem once, but with httpd. I use the restartWrapper - A
"very" nice perl script written by Mike McCauley, dunno his website though.
Maybe you can google.


> David Banning wrote:
> > I am running tmda-ofmipd for my smtp server and occasionally
> > it dies. I wonder how I could set it up to run so that if it
> > dies for some reason, it will start up again. Right now, it
> > starts in my rc.local like so;
> >
> > /usr/local/bin/tmda-ofmipd  -R imap://localhost -u tofmipd
>
> Look at DJB's daemontools, perhaps.  But the general idea is that you have
a
> monitor script which looks like:
>
> #! /bin/sh
>
> while : ; do
>     /usr/local/bin/tmda-ofmipd  -R imap://localhost -u tofmipd
>     echo "TMDA daemon died!  Restarting in 5 seconds..."
>     sleep 5
> done
>
> -- 
> -Chuck
>
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe@freebsd.org"
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005101c3727d$39392270$fe01a8c0>