From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1549 Path: news.gmane.org!not-for-mail From: Lasse Kliemann Newsgroups: gmane.comp.sysutils.supervision.general Subject: runsvdir under runsv Date: Wed, 10 Oct 2007 15:16:38 +0200 Message-ID: <20071010131638.GF2046@enterprise.starfleet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW" X-Trace: sea.gmane.org 1192021034 7302 80.91.229.12 (10 Oct 2007 12:57:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 12:57:14 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-1784-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Oct 10 14:57:13 2007 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1Ifb7f-0000u9-SW for gcsg-supervision@gmane.org; Wed, 10 Oct 2007 14:57:11 +0200 Original-Received: (qmail 21782 invoked by uid 76); 10 Oct 2007 12:57:27 -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 21776 invoked from network); 10 Oct 2007 12:57:26 -0000 Content-Disposition: inline Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1549 Archived-At: --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'd like to run a bunch of services in a kind of sub-hierarchy under=20 `/service/sub'; more precisely the service in `/service/sub' shall be somet= hing=20 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=20 `/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 onl= y=20 will essentially result in a `sv x /service/sub' (according to the=20 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 goo= d=20 solution, in particular whether it is free of race-conditions. Comments are welcome. --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHDNC21gObwed86AkRAvHCAKCPewUOwPGO6wuAaiyUZ6J0Sn/RbwCfU7FF 5uve0hqMwplIQmRQBnjUR54= =jeaU -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW--