how to run a program as a daemon
chael at southgate.ph.inter.net
chael at southgate.ph.inter.net
Wed Sep 3 17:41:05 PDT 2003
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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"freebsd-questions-unsubscribe at freebsd.org"
>
>
More information about the freebsd-questions
mailing list