mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 03:22:18 +00:00
fix systemd notice
This commit is contained in:
@@ -96,7 +96,7 @@ impl ServiceStateManager {
|
|||||||
ServiceState::Starting => {
|
ServiceState::Starting => {
|
||||||
info!("Service is starting...");
|
info!("Service is starting...");
|
||||||
#[cfg(target_os = "linux")]
|
#[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);
|
tracing::error!("Failed to notify systemd of starting state: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ impl ServiceStateManager {
|
|||||||
ServiceState::Stopped => {
|
ServiceState::Stopped => {
|
||||||
info!("Service has stopped");
|
info!("Service has stopped");
|
||||||
#[cfg(target_os = "linux")]
|
#[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);
|
tracing::error!("Failed to notify systemd of stopped state: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user