Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

status checking doesn't work properly under OS X 10.12 #53

Open
vegertar opened this issue Jul 10, 2017 · 0 comments
Open

status checking doesn't work properly under OS X 10.12 #53

vegertar opened this issue Jul 10, 2017 · 0 comments

Comments

@vegertar
Copy link

vegertar commented Jul 10, 2017

Hello, I'm working under OS X 10.12.

When I installed a daemon with a non-executable name like "port 8082", daemon would create a file named /Library/LaunchDaemons/port_8082.plist with incorrect binary path.

I glanced the codes, it might be failed while calling exec.LookPath so which used filepath.Abs(os.Args[0]) instead. Even though a little bit of extra time, it's still easy to fix by using absolute path from command line. But, I found a issue, when I used status to check, it was returned Service is running..., that was incredible. The output of sudo launchctl list port_8082 is shown as below, I hope I've provided all necessary details, if not, please feel free to point out it.

BTW, my command's name is example which is located in GOPATH, PATH as well.

{
	"StandardOutPath" = "/usr/local/var/log/port_8082.log";
	"LimitLoadToSessionType" = "System";
	"StandardErrorPath" = "/usr/local/var/log/port_8082.err";
	"Label" = "port_8082";
	"TimeOut" = 30;
	"OnDemand" = false;
	"LastExitStatus" = 19968;
	"Program" = "/Users/vegertar/PycharmProjects/cdntoolkit/ctk/collect/example";
	"ProgramArguments" = (
		"/Users/vegertar/PycharmProjects/cdntoolkit/ctk/collect/example";
		"run";
		"http";
		":8082";
	);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant