Skip to content

Commit

Permalink
Merge pull request #349 from jirkafajfr/master
Browse files Browse the repository at this point in the history
Allow specification of shell for the consul user
  • Loading branch information
johnbellone authored Sep 27, 2016
2 parents 2c551eb + 379ca3b commit 12aabe1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@
end
end

service_name = node['consul']['service_name']
poise_service_user node['consul']['service_user'] do
group node['consul']['service_group']
shell node['consul']['service_shell'] unless node['consul']['service_shell'].nil?
not_if { windows? }
not_if { node['consul']['service_user'] == 'root' }
notifies :restart, "consul_service[#{service_name}]", :delayed
end

service_name = node['consul']['service_name']
config = consul_config service_name do |r|
node['consul']['config'].each_pair { |k, v| r.send(k, v) }
notifies :reload, "consul_service[#{service_name}]", :delayed
Expand Down

0 comments on commit 12aabe1

Please sign in to comment.