how to run a program as a daemon
Joshua Oreman
oremanj at get-linux.org
Wed Sep 3 12:46:52 PDT 2003
On Wed, Sep 03, 2003 at 03:42:59PM -0400 or thereabouts, 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
>
> The only way I can think of doing it is to set up a crontab
> entry to a program that would check if it is still running,
> and if it is not, then have it start it again.
>
> I was hoping there is an easier way, maybe by putting it in inetd.conf
> or something...
You can use /etc/ttys for this (despite the name).
-- Josh
>
> --
> _______________________________________________
> 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