diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 7e8c15880..0810bb246 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -1395,8 +1395,8 @@ pub fn install_service() -> bool { "{cp} systemctl enable {app_name}; systemctl stop {app_name}; systemctl start {app_name};" )) { Config::set_option("stop-service".into(), "Y".into()); - return true; } + true } fn check_if_stop_service() { diff --git a/src/platform/macos.rs b/src/platform/macos.rs index ca3f0f75d..923d7d762 100644 --- a/src/platform/macos.rs +++ b/src/platform/macos.rs @@ -516,7 +516,7 @@ pub fn start_os_service() { server = get_server_start_time(&mut sys, &path); } if let Some((start_time, pid)) = server { - if my_start_time <= start_time { + if my_start_time <= start_time + 1 { log::error!( "Agent start later, {my_start_time} vs {start_time}, will restart --service to make delegate work", );