kardianos / service

Run go programs as a service on major platforms.
zlib License
4.45k stars 678 forks source link

[OpenRC] Try to resolve the service before calling `status` #376

Open jnummelin opened 1 year ago

jnummelin commented 1 year ago

This is needed as calling rc-service non-existing-svc status will exit with status 1 instead of the expected 2. So the only way to really detect the ErrNotInstalled case is by trying to first resolve the service init script. rc-service --resolve xyz will exit 1 if the service cannot be resolved.