Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for runit #16
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!