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.
Since /etc/init.d doesn't handle application crashes gracefully by restarting the consul application, I've updated the service recipe to >optionally< use runit (controlled by node[:consul][:init_style] since runit does handle application crashes. I've configured the default init_style to 'init' so that any current users of the cookbook won't be surprised by this addition.
Runit can also change the user/group of the consul application so it doesn't have to run as root. If the user selects runit init_style I update the /etc/consul.d, /var/log/consul and /var/lib/consul directories to be owned by that user/group instead of root/root.
Let me know if you'd like any additional changes to accept this pull request. I've tested my changes, and am running this in a development environment, where it's working perfectly.
Thanks for creating this cookbook, by the way!