Skip to content

Commit

Permalink
Merge pull request #35 from webcoyote/fix_runit
Browse files Browse the repository at this point in the history
Fix runit initialization on new server
  • Loading branch information
John Bellone committed Aug 19, 2014
2 parents 399a722 + ad8bc89 commit e10b7cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ suites:
attributes:
consul:
datacenter: FortMeade
- name: runit
run_list:
- recipe[consul::default]
attributes:
consul:
datacenter: FortMeade
init_style: runit
- name: ui
run_list:
- recipe[consul::default]
Expand Down
4 changes: 2 additions & 2 deletions recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
# Select service user & group
case node[:consul][:init_style]
when 'runit'
include_recipe 'runit'

consul_user = node[:consul][:service_user]
consul_group = node[:consul][:service_group]
consul_directories << '/var/log/consul'
Expand Down Expand Up @@ -116,8 +118,6 @@
subscribes :restart, "file[#{node[:consul][:config_dir]}/default.json]", :delayed
end
when 'runit'
include_recipe 'runit'

runit_service 'consul' do
supports status: true, restart: true, reload: true
action [:enable, :start]
Expand Down

0 comments on commit e10b7cb

Please sign in to comment.