From 2b360a8dd7723f4da1db2e20c2eb7e7ca3f2a96b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 10 Jul 2026 17:35:23 +0200 Subject: [PATCH] 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] --- src/systemd.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/systemd.rs b/src/systemd.rs index 422d91c9..36720d9c 100644 --- a/src/systemd.rs +++ b/src/systemd.rs @@ -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"); - } + if let Err(err) = notify(false, &[NotifyState::Ready]) { + error!(?err, "Failed to notify systemd"); } }