mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
gate sd_notify to linux target_os only
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
66231676f1
commit
53d03bbb1f
2 changed files with 3 additions and 3 deletions
|
@ -80,7 +80,7 @@ tower.workspace = true
|
|||
tower-http.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
[target.'cfg(all(unix, target_os = "linux"))'.dependencies]
|
||||
sd-notify.workspace = true
|
||||
sd-notify.optional = true
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue