Skip to content

Commit

Permalink
支持OpenWrt模式的rc.init,它只有一个rc.d目录
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Sep 24, 2023
1 parent 83bcc8f commit 6287f8e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NewLife.Agent/RcInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ public static Boolean Install(String systemdPath, String serviceName, String fil
Process.Start("ln", $"-s {systemdPath}/{serviceName} {dir}S10{serviceName}");
}
}
// OpenWrt
{
var dir = "/etc/rc.d/";
if (Directory.Exists(dir))
{
Process.Start("ln", $"-s {systemdPath}/{serviceName} {dir}S50{serviceName}");
}
}

return true;
}
Expand Down

0 comments on commit 6287f8e

Please sign in to comment.