supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Lasse Kliemann <lasse-list-supervision-2007@plastictree.net>
To: supervision@list.skarnet.org
Subject: runsvdir under runsv
Date: Wed, 10 Oct 2007 15:16:38 +0200	[thread overview]
Message-ID: <20071010131638.GF2046@enterprise.starfleet> (raw)

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

I'd like to run a bunch of services in a kind of sub-hierarchy under 
`/service/sub'; more precisely the service in `/service/sub' shall be something 
like runsvdir managing services in a directory `/service/sub/service'.

The naive approach was to let `/service/sub/run' be like this:

   #!/bin/sh
   exec runsvdir service

One problem with this is that bringing down all services in 
`/service/sub/services' involves something like

   sv o /service/sub ; sv h /service/sub

meaning that a simple removal of `/service/sub' is not enough, for this only 
will essentially result in a `sv x /service/sub' (according to the 
documentation of runit). As a solution, I came up with putting

   #!/bin/sh
   sv h .

into `control/t'. It seems to work, but I am not sure whether this is a good 
solution, in particular whether it is free of race-conditions.

Comments are welcome.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2007-10-10 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 13:16 Lasse Kliemann [this message]
2007-10-10 19:42 ` Joan Picanyol i Puig
2007-10-10 21:47   ` Lasse Kliemann
2007-10-11 12:50     ` Gerrit Pape
2007-10-11 16:06       ` Lasse Kliemann

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=20071010131638.GF2046@enterprise.starfleet \
    --to=lasse-list-supervision-2007@plastictree.net \
    --cc=supervision@list.skarnet.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).