gate sd_notify to linux target_os only

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2025-01-10 10:25:07 -05:00
parent 66231676f1
commit 53d03bbb1f
2 changed files with 3 additions and 3 deletions

View file

@ -63,7 +63,7 @@ pub(crate) async fn start(server: Arc<Server>) -> Result<Arc<Services>> {
let services = Services::build(server).await?.start().await?;
#[cfg(feature = "systemd")]
#[cfg(all(feature = "systemd", target_os = "linux"))]
sd_notify::notify(true, &[sd_notify::NotifyState::Ready])
.expect("failed to notify systemd of ready state");
@ -99,7 +99,7 @@ pub(crate) async fn stop(services: Arc<Services>) -> Result<()> {
);
}
#[cfg(feature = "systemd")]
#[cfg(all(feature = "systemd", target_os = "linux"))]
sd_notify::notify(true, &[sd_notify::NotifyState::Stopping])
.expect("failed to notify systemd of stopping state");