Skip to content

Commit

Permalink
fix launchctl
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Sep 10, 2023
1 parent c5caae2 commit 83bcc8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NewLife.Agent/OSXLaunch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override Boolean IsRunning(String serviceName)
var file = GetFileName(serviceName);
if (!File.Exists(file)) return false;

var str = Execute("systemctl", $"status {serviceName}", false);
var str = Execute("launchctl", $"status {serviceName}", false);
if (!str.IsNullOrEmpty() && str.Contains("running")) return true;

return false;
Expand Down

0 comments on commit 83bcc8f

Please sign in to comment.