From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23253 invoked from network); 2 Aug 2021 21:40:41 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 2 Aug 2021 21:40:41 -0000 Received: (qmail 19747 invoked by uid 89); 2 Aug 2021 21:41:05 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 19740 invoked from network); 2 Aug 2021 21:41:05 -0000 From: "Laurent Bercot" To: "Steve Litt" , supervision@list.skarnet.org Subject: Re: S6 Queries Date: Mon, 02 Aug 2021 21:40:39 +0000 Message-Id: In-Reply-To: <20210802164201.331cafaf@mydesk.domain.cxm> References: <20210802140732.316b9f4d@mydesk.domain.cxm> <20210802164201.331cafaf@mydesk.domain.cxm> Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.2.1473.0 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddriedvgdduheduucetufdoteggodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfrhgfgggtgfesthhqredttderjeenucfhrhhomhepfdfnrghurhgvnhhtuceuvghrtghothdfuceoshhkrgdqshhuphgvrhhvihhsihhonhesshhkrghrnhgvthdrohhrgheqnecuggftrfgrthhtvghrnhepvdfgveffueelgedvkedtffetgedvieeifeektefgueehffehleehjefhveeuieejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuth >Do you think this is any better? > >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >#!/bin/sh >test_for_myrequirement || exit 1 >exec mydaemon -myarg1 -myarg2 >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D This does not accomplish the same thing at all: it does not ensure that myrequirement is at least attempted before mydaemon runs. Instead, it conditions the readiness of mydaemon to that of myrequirement. So, it is "better" in the sense that it does not control another service from a run script, but it is even further from what the OP wants. Any reference to another service in a run script is going to be quirky at best. Managing all kinds of dependencies between services is really best done *outside* of run scripts, which is why s6-rc exists. It does not currently have all the expressive power of systemd for dependencies, but in the future, it will. -- Laurent