From owner-freebsd-questions Wed Mar 7 16:54:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from camelot.bitart.com (BITart-45.BITart.com [206.103.221.45]) by hub.freebsd.org (Postfix) with SMTP id DAE4137B718 for ; Wed, 7 Mar 2001 16:54:30 -0800 (PST) (envelope-from gerti@bitart.com) Received: (qmail 1863 invoked by uid 101); 8 Mar 2001 00:54:24 -0000 Message-ID: <20010308005424.1862.qmail@camelot.bitart.com> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 4.2mach v148) In-Reply-To: <000b01c0a767$32c75c10$1e00000a@a> X-Nextstep-Mailer: Mail 4.2mach (Enhance 2.2p1) Received: by NeXT.Mailer (1.148) From: Gerd Knops Date: Wed, 7 Mar 2001 18:54:24 -0600 To: "dennis" Subject: Re: monitor Cc: Reply-To: gerti-freebsdq@BITart.com References: <000b01c0a767$32c75c10$1e00000a@a> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG dennis wrote: > I am using FreeBSD 4.2 and I am looking for a program to > monitor telnet, ftp, sendmail, inetd, apache, mysql and to restart > them after any failure. > > I have seen netsaint and monitord. > > Would it be possible to use cron instead ? > > Any suggesstions ? I am looking for the easiest way to do this. > A brute-force method I used for a while for apache was this (in the cron), may be wrapped but is supposed to be on 1 line: /bin/sh -c "ps `cat ${HTTPDHOME}/www/logs/httpd.pid` | fgrep -s '/usr/local/bin/httpd' || /usr/local/bin/httpd -d ${HTTPDHOME}/www" I guess similar methods could be used for other daemons as well. Gerd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message