From b714d0f73387f01ea11fdbe6b3cbf6c6718ce1c4 Mon Sep 17 00:00:00 2001 From: chalice-1831 <844589474@qq.com> Date: Sat, 8 Feb 2025 18:03:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20restart=E4=BD=BF=E7=94=A8gsectl=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E5=91=BD=E4=BB=A4=E4=B8=8D=E6=AD=A3=E7=A1=AE(closed?= =?UTF-8?q?=20#2540)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/backend/components/collections/agent_new/restart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/backend/components/collections/agent_new/restart.py b/apps/backend/components/collections/agent_new/restart.py index 9ffa8dc2d..79405266f 100644 --- a/apps/backend/components/collections/agent_new/restart.py +++ b/apps/backend/components/collections/agent_new/restart.py @@ -30,7 +30,7 @@ def get_script_content(self, data, common_data: AgentCommonData, host: models.Ho """ # 路径处理器 path_handler = PathHandler(host.os_type) - ctl_exe_name = ("gsectl", "gsectl.bat")[host.os_type == constants.OsType.WINDOWS] + ctl_exe_name = path_handler.join(".", ("gsectl", "gsectl.bat")[host.os_type == constants.OsType.WINDOWS]) cmd_suffix = ("restart >/dev/null 2>&1", "restart")[host.os_type == constants.OsType.WINDOWS] general_node_type = self.get_general_node_type(host.node_type) host_ap: models.AccessPoint = self.get_host_ap(common_data=common_data, host=host)