Here's sdnotify-wrapper[1] but inverted: it pretends to be systemd's side of 
the sd-notify protocol, listens for an sd-style "READY=1", and then notifies s6 
on behalf of the ready service.

There's software out there already written to work with systemd's readiness 
notification, and I'd like to run it under s6 without polling for readiness. In 
this case, I'm thinking about tailscale[2], but I wouldn't be surprised if this 
situation arises for other services as well.

(Ideally, of course, each service would be able to do simple s6-style readiness 
notification on its own. I might want to write a patch for tailscale, but I'm 
not sure if they'd accept it upstream.)

I've attached a rough implementation of this idea, but I'd love to know if 
anyone else has already done this. Or else maybe someone would find this useful 
as a starting point.

Emily

[1]: https://skarnet.org/software/misc/sdnotify-wrapper.c
[2]: 
https://github.com/tailscale/tailscale/blob/dc180916/util/systemd/systemd_linux.go

Reply via email to