Using the service manager from an remote ssh command promt fails
with
`The service process could not connect to the service controller`
Thanks to the detailed analysis from @kelseyma the fix was very straight
forward.
Using IsWindowsService() solved this problem for me.
The mentioned issue at https://github.com/golang/go/issues/44921
has also been fixed in the meantime, so there is no reason not to
use IsWindowsService() instead.
Fixes#300
Doing so will create services that are broken and will fail
when started:
`Error 87: The parameter is incorrect`
This is a regression from https://github.com/kardianos/service/pull/312
* Shutdowner interface and Windows trigger
* Updating Shutdown doc
Stop won't be called when Shutdown is.
Co-authored-by: Juan Hernandez <jhernandez@newrelic.com>
* service(windows): added option flag for delayed automatic start
* service(windows): added option flag for delayed automatic start
Co-authored-by: Utkarsh Dixit <utkarsh.dixit@siemens.com>
* Add ability for service to report the system managing the service
* Clarify that the output of SystemName should return the same value as Platform in most cases
* Rename SystemName to Platform to match the rest of the package
* be a little more clear in the Platform comment
* update command execution to support returing error codes, and stdout
add function to service interface to support returning service status
clean up places where strings were being converted to strings
* Spelling fix
* Simply service Status method
Add stopped detection to launchd
Switch to case statements
Return ErrNotInstalled in situations where we should
Previous behavior simply signalled the service to stop.
The new behavior actually waits for the service to stop.
This makes the Restart method for windows to be more robust
when a service takes more time to clean up.