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.
* support the dependency config for linux systemd
* remote the binary file incorrectly added
* Support the systemd option setting for 'Restart' and 'SuccessExitStatus'
* Linux systemd: fixed bug in service configuration template. Dependencies should now work for Linux systemd.
* Linux systemd: enabled detection of systemd inside chroot environments
* Linux systemd: enabled detection of systemd inside chroot environments fix
* 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