Closed joeblew99 closed 8 years ago
just to be clear i click the binary and i get
gedw99-MacBook-Pro:serverX_darwin_amd64 apple$ ./serverX I: 15:58:57 Running in terminal. I: 15:58:57 I'm running darwin-launchd. I: 15:58:59 Still running at 2016-02-17 15:58:59.827872251 +0100 CET... ^CI: 15:59:01 I'm Stopping!
But how to tell it to install as a service and start when the machine starts up ? How to uninstall it as a service ?
I would recommend reading https://godoc.org/github.com/kardianos/service , esp read https://godoc.org/github.com/kardianos/service#Service and https://godoc.org/github.com/kardianos/service#Control
Try using the -service flag in that example: https://github.com/kardianos/service/blob/master/example/logging/main.go#L63
ok that makes sense - should have seen that :) thanks @kardianos
Just testing this out. I am using your logging example because it gives interactive feedback to get me going.
My use case if that i need to start the following up on a windows machine, in the following order:
So far: I used goxc to build for windows, mac and linux. Easy.
So i have the logging binary, but not sure how to control it ???