Re: Have an external script wait for a oneshot service
unsubscribe
> On 5 Dec 2024, at 00:00, Brett Neumeier via supervision <supervision_at_list.skarnet.org> wrote:
>
> On Wed, 4 Dec 2024 16:28:01 +0100
> Paul Sopka <psopka_at_sopka.ch> 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 <random_at_freesa.org>
Received on Wed Dec 04 2024 - 21:09:43 CET
This archive was generated by hypermail 2.4.0
: Wed Dec 04 2024 - 21:10:24 CET