From c1f781256fb4d776ad8a251f4fe65e676341ff22 Mon Sep 17 00:00:00 2001 From: houseme Date: Fri, 11 Apr 2025 20:02:51 +0800 Subject: [PATCH] fix systemd notice --- rustfs/src/server/service_state.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rustfs/src/server/service_state.rs b/rustfs/src/server/service_state.rs index e1d03c8a..d27296e3 100644 --- a/rustfs/src/server/service_state.rs +++ b/rustfs/src/server/service_state.rs @@ -96,7 +96,7 @@ impl ServiceStateManager { ServiceState::Starting => { info!("Service is starting..."); #[cfg(target_os = "linux")] - if let Err(e) = libsystemd::daemon::notify(false, &[libsystemd::daemon::NotifyState::Status("Starting...")]) { + if let Err(e) = libsystemd::daemon::notify(false, &[libsystemd::daemon::NotifyState::Status("Starting...".to_string())]) { tracing::error!("Failed to notify systemd of starting state: {}", e); } } @@ -111,7 +111,7 @@ impl ServiceStateManager { ServiceState::Stopped => { info!("Service has stopped"); #[cfg(target_os = "linux")] - if let Err(e) = libsystemd::daemon::notify(false, &[libsystemd::daemon::NotifyState::Status("Stopped")]) { + if let Err(e) = libsystemd::daemon::notify(false, &[libsystemd::daemon::NotifyState::Status("Stopped".to_string())]) { tracing::error!("Failed to notify systemd of stopped state: {}", e); } }