From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 12:43:05 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 021E716A4C2 for ; Wed, 3 Sep 2003 12:43:05 -0700 (PDT) Received: from mail.clubplus.net (mail.clubplus.net [216.191.22.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CD2944001 for ; Wed, 3 Sep 2003 12:43:03 -0700 (PDT) (envelope-from david+dated+1063050181.812806@skytracker.ca) Received: from 3s1.com (cust29.209.188.66.dsl.accessv.com [209.188.66.29]) by mail.clubplus.net (8.12.7/8.12.7) with ESMTP id h83Jq3WI007682 for ; Wed, 3 Sep 2003 15:52:03 -0400 Received: (from root@localhost) by 3s1.com (8.12.8p1/8.12.8) id h83Jh13J023467 for questions@freebsd.org; Wed, 3 Sep 2003 15:43:01 -0400 (EDT) (envelope-from david+dated+1063050181.812806@skytracker.ca) Received: from 3s1.com (localhost [127.0.0.1]) by 3s1.com (8.12.8p1/8.9.3) with ESMTP id h83Jh19H023443 for ; Wed, 3 Sep 2003 15:43:01 -0400 (EDT) Date: Wed, 3 Sep 2003 15:42:59 -0400 To: questions@freebsd.org Message-ID: <20030903194259.GA23225@skytrackercanada.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i From: David Banning X-Delivery-Agent: TMDA/0.70 (Pensive) X-scanner: scanned by Inflex 1.0.12.3 - (http://pldaniels.com/inflex/) X-RAVMilter-Version: 8.4.2(snapshot 20021217) (mail) Subject: how to run a program as a daemon X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2003 19:43:05 -0000 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... --