From owner-freebsd-questions@FreeBSD.ORG Wed May 21 13:34:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502791065676 for ; Wed, 21 May 2008 13:34:13 +0000 (UTC) (envelope-from Sahil.Tandon@morganstanley.com) Received: from pimtabh4.ms.com (pimtabh4.ms.com [199.89.64.104]) by mx1.freebsd.org (Postfix) with ESMTP id EFACD8FC1C for ; Wed, 21 May 2008 13:34:12 +0000 (UTC) (envelope-from Sahil.Tandon@morganstanley.com) Received: from pimtabh4 (localhost.ms.com [127.0.0.1]) by pimtabh4.ms.com (output Postfix) with ESMTP id 2DE9E48201; Wed, 21 May 2008 09:34:12 -0400 (EDT) Received: from ny0019as02 (unknown [144.203.210.133]) by pimtabh4.ms.com (internal Postfix) with ESMTP id 163334A8019; Wed, 21 May 2008 09:34:12 -0400 (EDT) Received: from ny0019as02 (localhost [127.0.0.1]) by ny0019as02 (msa-out Postfix) with ESMTP id EBD30700058; Wed, 21 May 2008 09:34:11 -0400 (EDT) Received: from PIWEXOB01.msad.ms.com (piwexob01 [144.14.3.72]) by ny0019as02 (mta-in Postfix) with ESMTP id E93492B402F; Wed, 21 May 2008 09:34:11 -0400 (EDT) Received: from NYWEXPF68.msad.ms.com ([205.228.46.4]) by PIWEXOB01.msad.ms.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 21 May 2008 09:34:11 -0400 Received: from NYWEXMB58.msad.ms.com ([205.228.46.156]) by NYWEXPF68.msad.ms.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 21 May 2008 09:34:10 -0400 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Importance: normal Priority: normal Date: Wed, 21 May 2008 09:34:10 -0400 Message-ID: In-Reply-To: <200805211117.41260.jonathan+freebsd-questions@hst.org.za> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rc script REQUIRE-ing a service on another host Thread-Index: Aci7Ix4oZo0xYFeuSOONKG4PufYAcQAI5gUQ References: <200805211117.41260.jonathan+freebsd-questions@hst.org.za> From: "Tandon, Sahil \(IM\)" To: "Jonathan McKeown" X-OriginalArrivalTime: 21 May 2008 13:34:10.0787 (UTC) FILETIME=[5A0C0B30:01C8BB47] X-Anti-Virus: Kaspersky Anti-Virus for MailServers 5.5.15/RELEASE, bases: 21052008 #704568, status: clean Cc: freebsd-questions@freebsd.org Subject: RE: rc script REQUIRE-ing a service on another host X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2008 13:34:13 -0000 Jonathan McKeown: > We had a power failure last night, and this morning I found=20 > that imapproxyd (running on a webserver which provides=20 > webmail) had failed to start because it depends on imapd=20 > (running on the mailserver, a different host), and imapproxyd=20 > had won the startup race. >=20 > I need to prevent the race by making one service depend on=20 > another service running remotely. While I sketch out some=20 > horribly untidy fix, can the Lazyweb tell me if there is=20 > already a neat solution for this? I do not know if this is possible within the rc script itself. Have you looked into sysutils/monit (to monitor and restart a=20 service like imapproxyd)? Nagios is probably overkill for this. =20 Monit can be configured to check whether imapproxyd is running=20 and restart it if necessary. Just make sure you do not make the monit rc script depend on anything running remotely. :-) -- Sahil Tandon -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender = does not intend to waive confidentiality or privilege. Use of this email = is prohibited when received in error.