* fix for the openrc status func
Signed-off-by: Karen Almog <kalmog@mirantis.com>
* openrc: exitCode parsing for better status
Signed-off-by: Karen Almog <kalmog@mirantis.com>
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.
* 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>
Added some checking in the stderr reading of `run` in `service_unix` to
identify if the output ended with `Operation now in progress` is the
command was `launchctl`.
If the output has the suffix it is ignored and treated as a non-error,
all other standard error output is treaded as an error like normal.
* 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