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.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16541 invoked from network); 2 Aug 2021 20:42:05 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 2 Aug 2021 20:42:05 -0000 Received: (qmail 18524 invoked by uid 89); 2 Aug 2021 20:42:30 -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 18517 invoked from network); 2 Aug 2021 20:42:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; s=default; d=troubleshooters.com; b=ZjhMNvTr2KbNE8VdZ3J1Z5Nk4LHdWIyqN/MwrcDaI/uNURMd2SK58400HiTIxwzdnwYTwHdt0VTJL/OTgyVLHm3GXIsLLzCqfJi065iQIbCgwTFSGkQmfUV84IMmxnHpSKIVxTYF24BJ40eMM83Cf0gljPPgdCx/lg0cVT4RLik=; DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=troubleshooters.com; s=default; t=1627936921; bh=0IEaVyTBf/J6mSxTqsfeDmybXvE=; l=1067; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CldhyKNaYulfZVNX1S+bhO34aISn2qJYiAaR4nt/BxPHBLpqxMBqWVA/n9PGgiNb7 crG8omkIJCJOAi2l7sVBAesPxy4hR6BeOQYd+NaFCosHdprJumDoWIIwsyb1I+oJXa PibQXZu7rnU6+7W6hdei4t6zuOuz2WlQ5rlBxTJM= X-Originating-IP: [184.90.157.212] Date: Mon, 2 Aug 2021 16:42:01 -0400 From: Steve Litt To: supervision@list.skarnet.org Subject: Re: S6 Queries Message-ID: <20210802164201.331cafaf@mydesk.domain.cxm> In-Reply-To: References: <20210802140732.316b9f4d@mydesk.domain.cxm> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Laurent Bercot said on Mon, 02 Aug 2021 19:39:47 +0000 >>I thought the way to do what the OP asked is: >> >>============================= >>#!/bin/sh >>s6-svc -u myrequirement || exit 1 >>exec mydaemon -myarg1 -myarg2 >>============================= > > This is not a good idea in a s6-rc installation, because it sends >raw s6 commands, which may mess with the service state as viewed by >s6-rc. Also, it sends control commands to a service from another >service's run script, which is bad form in general: it is >unintuitive that starting the mydaemon service also causes the >myrequirement service to be started. Dependencies should be handled at >the service manager level, not at the process supervision level. Do you think this is any better? ============================= #!/bin/sh test_for_myrequirement || exit 1 exec mydaemon -myarg1 -myarg2 ============================= SteveT Steve Litt Spring 2021 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques