3b7119afcd2dc8899fd86af068572d022169cab3
The library is using inconsistent names when calling `systemctl` commands. Let's say that the service is named `name`. The unit file will be then named `name.service` - this is the popular pattern used also by this library. While for most common commands like `systemctl start` there is no difference whether `name` or `name.service` will be used as the service identifier, the `list-unit-files` command expects explicitly the unit file name. Currently just the name - without the `.service` suffix - is being used, which causes the command to return no output, not match the name of the service and finally respond the status of installed but inactive service as `StatusUnknown` with `ErrNotInstalled` error. While `StatusStopped` without any error is expected. Considering `systemctl` behavior it's just easier to: - have one method that constructs the `name.service` name, - use it for all `systemctl` commands calls. And this is the change that this commit is adding.
service 
service will install / un-install, start / stop, and run a program as a service (daemon). Currently supports Windows XP+, Linux/(systemd | Upstart | SysV), and OSX/Launchd.
Windows controls services by setting up callbacks that is non-trivial. This is very different then other systems. This package provides the same API despite the substantial differences. It also can be used to detect how a program is called, from an interactive terminal or from a service manager.
BUGS
- Dependencies field is not implemented for Linux systems and Launchd.
- OS X when running as a UserService Interactive will not be accurate.
Description
Languages
Go
98.4%
Makefile
1%
Shell
0.3%
Dockerfile
0.3%