Log result of systemd notification

This commit is contained in:
Shawn Wallace 2024-11-21 19:01:50 -05:00
parent 3e6f892d20
commit 02f3054626

View file

@ -160,7 +160,15 @@ pub fn main(data: impl RunData) -> Option<()> {
server_state.atoms = Some(xstate.atoms.clone());
#[cfg(feature = "systemd")]
let _ = sd_notify::notify(true, &[sd_notify::NotifyState::Ready]);
{
match sd_notify::notify(true, &[sd_notify::NotifyState::Ready]) {
Ok(()) => info!("Successfully notified systemd of ready state."),
Err(e) => log::warn!("Systemd notify failed: {e:?}"),
}
}
#[cfg(not(feature = "systemd"))]
info!("Systemd support disabled.");
}
if let Some(xstate) = &mut xstate {