main: notify readiness on non-systemd systems

Other service supervisors implement systemd's readiness notification
protocol.  For example, s6 implements it with the
s6-notify-fd-from-socket[1] program.  libsystemd::daemon::notify
already checks for NOTIFY_SOCKET being set, which should be sufficient
to tell if systemd-style readiness notification is wanted.

Link: https://skarnet.org/software/s6/s6-notify-fd-from-socket.html [1]
This commit is contained in:
Alyssa Ross 2026-07-10 17:35:23 +02:00 committed by Victoria Brekenfeld
parent 2329cea5c9
commit 2b360a8dd7

View file

@ -27,9 +27,9 @@ pub fn ready(common: &Common) {
),
Err(err) => error!(?err, "Failed to run systemctl although booted with systemd",),
};
}
if let Err(err) = notify(false, &[NotifyState::Ready]) {
error!(?err, "Failed to notify systemd");
}
}
}