-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add service overrides for picking specific service managers, add runit_service #380
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NB I've just added default duplicates to one instance (i.e., there's only one `systemd_service`), since there's no os-specific magic in them. Also these tests only verify that the default choice is equivalent to `service` on the tested distribution.
I've recovered the debian/centos special handling of the `service` binary, although I doubt that it's necessary.
srenatus
force-pushed
the
sr/service-override
branch
from
January 21, 2016 10:35
2d2745d
to
ef77e01
Compare
cmd = inspec.command("#{service_cmd} #{service_name} status") | ||
cmd.exit_status == 0 ? (running = true) : (running = false) | ||
cmd = inspec.command("#{service_ctl} #{service_name} status") | ||
running = cmd.exit_status == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
awesome job @srenatus |
chris-rock
added a commit
that referenced
this pull request
Jan 21, 2016
add service overrides for picking specific service managers, add runit_service
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes to
lib/resource/service.rb
have gotten a little bigger. The handling ofservice_ctl
still feels a little awkward, so when you review this, please keep your eyes open for further possible simplifications.The problem is that when you use
runit_service('name', '/path/to/sv')
, the latter needs to be passed to the underlyingServiceManager
, and thus bothService
andServiceManager
need the optional argument in their constructors.I've added integration tests installing runit on centos.
Fixes #242.
TODO: Documentation -- so, currently,
docs/resources.rst
has to be updated manually?