Fixed a bug where systemd init error would not display

This commit is contained in:
Antoine Gersant 2022-11-21 17:31:12 -08:00
parent c57583d1d4
commit 1812bedfd2

View file

@ -65,7 +65,7 @@ fn daemonize<T: AsRef<Path>>(foreground: bool, pid_file_path: T) -> Result<(), E
#[cfg(unix)]
fn notify_ready() -> Result<(), Error> {
if let Ok(true) = sd_notify::booted() {
sd_notify::notify(true, &[sd_notify::NotifyState::Ready]).map_err(Error::SystemDNotify);
sd_notify::notify(true, &[sd_notify::NotifyState::Ready]).map_err(Error::SystemDNotify)?;
}
Ok(())
}