fix: improve Service connection method and permissions for Windows and Unix

This commit is contained in:
Tunglies
2025-10-11 23:40:37 +08:00
parent 4f1d61a56e
commit d531432f4a
16 changed files with 535 additions and 779 deletions

View File

@@ -1,9 +1,6 @@
use super::CmdResult;
use crate::{
core::{
CoreManager,
service::{self, SERVICE_MANAGER, ServiceStatus},
},
core::service::{self, SERVICE_MANAGER, ServiceStatus},
utils::i18n::t,
};
@@ -17,10 +14,6 @@ async fn execute_service_operation_sync(status: ServiceStatus, op_type: &str) ->
let emsg = format!("{} Service failed: {}", op_type, e);
return Err(t(emsg.as_str()).await);
}
if CoreManager::global().restart_core().await.is_err() {
let emsg = "Restart Core failed";
return Err(t(emsg).await);
}
Ok(())
}