From bd6eb2a2dd3331720640ca2c2793d11895e2349e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Sun, 24 Sep 2023 19:56:58 +0800 Subject: [PATCH] rc.d --- NewLife.Agent/RcInit.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NewLife.Agent/RcInit.cs b/NewLife.Agent/RcInit.cs index 16e2229..754f49b 100644 --- a/NewLife.Agent/RcInit.cs +++ b/NewLife.Agent/RcInit.cs @@ -189,6 +189,15 @@ public override Boolean Remove(String serviceName) if (File.Exists(file)) File.Delete(file); } } + // OpenWrt + { + var dir = "/etc/rc.d/"; + if (Directory.Exists(dir)) + { + file = dir.CombinePath($"S50{serviceName}"); + if (File.Exists(file)) File.Delete(file); + } + } return true; }