-
Notifications
You must be signed in to change notification settings - Fork 713
Open
Description
I wrote a service named ctrld, after installing, verifying that the service is running:
$ sudo ./ctrld status
Jul 17 15:27:34.000 NTC Service is running
$ ./ctrld status
Jul 17 15:27:27.000 NTC Service is stopped
Querying the status using launchctl confirms this:
$ sudo launchctl list ctrld
{
"StandardOutPath" = "/usr/local/var/log/ctrld.out.log";
"LimitLoadToSessionType" = "System";
"StandardErrorPath" = "/usr/local/var/log/ctrld.err.log";
"Label" = "ctrld";
"OnDemand" = false;
"LastExitStatus" = 0;
"PID" = 11444;
"Program" = "/Users/cuonglm/ctrld";
"ProgramArguments" = (
"/Users/cuonglm/ctrld";
"run";
"--cd=p2";
"--iface=auto";
"--homedir=/etc/controld";
"--config=/etc/controld/ctrld.toml";
);
};
$ launchctl list ctrld
Could not find service "ctrld" in domain for port
The problem seems to be this line:
Line 219 in becf2eb
| if !strings.Contains(err.Error(), "failed with stderr") { |
Specifically, this condition !strings.Contains(err.Error(), "failed with stderr") is the culprit.
Metadata
Metadata
Assignees
Labels
No labels