supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: Should svwaitup/down be built again, or how to make sv do this?
Date: Thu, 13 Jul 2006 08:44:21 +0000	[thread overview]
Message-ID: <20060713084421.7943.qmail@0c0c26b6d83f02.315fe32.mid.smarden.org> (raw)
In-Reply-To: <200607121127.48966.spamite@ev1.net>

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.


  reply	other threads:[~2006-07-13  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-12  1:59 Kevin
2006-07-12 15:20 ` Gerrit Pape
2006-07-12 16:27   ` Kevin
2006-07-13  8:44     ` Gerrit Pape [this message]
2006-07-17 17:56       ` Kevin
2006-07-17 19:32         ` Stefan Karrmann
2006-07-18  8:38         ` Uffe Jakobsen
2006-07-19 18:46           ` Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060713084421.7943.qmail@0c0c26b6d83f02.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).