From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.4 Received: from alyss.skarnet.org (alyss.skarnet.org [95.142.172.232]) by inbox.vuxu.org (Postfix) with SMTP id 49AF02F5C6 for ; Wed, 4 Dec 2024 21:00:26 +0100 (CET) Received: (qmail 51646 invoked by uid 89); 4 Dec 2024 20:00:52 -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 51639 invoked from network); 4 Dec 2024 20:00:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freesa.org; s=20240917; t=1733342423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bPg8Wr7jSWe9P8lNwRJkOwpM3ci9CaCKqG341wdMFMI=; b=q5kyQZt1mKPPziOiRL+WXHoPVlukr0xLvQz26YLibxN88HLVnnQBmQM0nOqc2WsWEmaHLx 4Whi9Zhi9gR9oSCcHeCZXDCvdp7NnLvV/Jb5KGPt6WWiWLtTe7+aed+h4BaGzcKFoI5a05 RHvpWtmebdFI3SCgP+Q8jbC41tyEFPA= Date: Wed, 4 Dec 2024 14:00:15 -0600 From: "Brett Neumeier via supervision" Reply-To: Brett Neumeier To: Paul Sopka Cc: "supervision@list.skarnet.org" Subject: Re: Have an external script wait for a oneshot service Message-Id: <20241204140015.4e635037306d88117e053994@freesa.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 4 Dec 2024 16:28:01 +0100 Paul Sopka wrote: > My question is basically what the subject says: > Is there a way for an external script to know when an s6-rc oneshot > finished and is in "up" state? You could use `s6-rc -a list`, perhaps? It lists all services that are in the active state. For example, I have a oneshot service called `swap` that turns on or off swap volumes. # s6-rc -a list | grep swap swap # s6-rc stop swap # s6-rc -a list | grep swap # I could run `grep -q swap` and then the exit status would tell me if it's running or not. Does that give you what you want? -- Brett Neumeier