From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1201 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Should svwaitup/down be built again, or how to make sv do this? Date: Thu, 13 Jul 2006 08:44:21 +0000 Message-ID: <20060713084421.7943.qmail@0c0c26b6d83f02.315fe32.mid.smarden.org> References: <200607112100.08660.spamite@ev1.net> <20060712152013.7834.qmail@01ba84912064b9.315fe32.mid.smarden.org> <200607121127.48966.spamite@ev1.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152780251 1552 80.91.229.2 (13 Jul 2006 08:44:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2006 08:44:11 +0000 (UTC) Original-X-From: supervision-return-1437-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Jul 13 10:44:09 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1G0wnh-0002fg-0D for gcsg-supervision@gmane.org; Thu, 13 Jul 2006 10:44:01 +0200 Original-Received: (qmail 25299 invoked by uid 76); 13 Jul 2006 08:44:21 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 25290 invoked from network); 13 Jul 2006 08:44:21 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <200607121127.48966.spamite@ev1.net> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1201 Archived-At: On Wed, Jul 12, 2006 at 11:27:21AM -0500, Kevin wrote: > On Wednesday 12 July 2006 10:20, Gerrit Pape wrote: > > I'm not sure what exactly you used the svwait* programs for, so I > > cannot say whether or how it works with 'sv check/start/stop'. > We cannot make sv block like svwaitup did. Either we're misunderstanding > how to use it, or something. > > An example service script is included below: > > #!/bin/sh > svwaitup ~/service/sfsagent > exec chpst -e env runthis.sh svwaitup did wait two seconds by default after the sfsagent service daemon has been started, this seems to be what you relied on. Indeed, sv doesn't do that by default, but it supports the ./check script instead. If you want 'sv start ~/service/sfsagent' or 'sv check ~/service/sfsagent' to wait for two seconds before returning, simply do 'sleep 2' in ~/service/sfsagent/check. Better yet, find out how to check for what the sfsagent service daemon needs to provide before runthis.sh can be started, and check for that in ~/service/sfsagent/check. E.g., the ./check script from the socklog-unix service runs a tiny program that tries to connect to the /dev/log socket, without writing anything to it, and only exits zero if the connect succeeds. This makes 'sv start socklog-unix' wait until the socklog service daemon is listening on /dev/log, and accepts local log messages. Regards, Gerrit.