sdnotify-wrapper but the other way around

From: <short.cross0654_at_uwu.tube>
Date: Sat, 01 Mar 2025 16:30:52 -0800

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

Received on Sun Mar 02 2025 - 01:30:52 CET

This archive was generated by hypermail 2.4.0 : Sun Mar 02 2025 - 01:32:39 CET