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

Reply via email to