From owner-freebsd-questions@FreeBSD.ORG Wed Sep 3 17:41: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 7B4CD16A4BF for ; Wed, 3 Sep 2003 17:41:05 -0700 (PDT) Received: from southgate.ph.inter.net (lanceb.ph.inter.net [202.61.82.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 494B743F3F for ; Wed, 3 Sep 2003 17:41:04 -0700 (PDT) (envelope-from chael@southgate.ph.inter.net) Received: from JMICH (jmich [192.168.1.254]) by southgate.ph.inter.net (Postfix) with SMTP id B19C6236B; Thu, 4 Sep 2003 08:41:01 +0800 (PHT) Message-ID: <005101c3727d$39392270$fe01a8c0@JMICH> From: To: "Chuck Swiger" , "David Banning" References: <20030903194259.GA23225@skytrackercanada.com> <3F564740.5050704@mac.com> Date: Thu, 4 Sep 2003 08:41:05 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: questions@freebsd.org Subject: Re: 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: Thu, 04 Sep 2003 00:41:05 -0000 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" > >