Skip to content

Commit

Permalink
Allow specification of shell for the consul user
Browse files Browse the repository at this point in the history
  • Loading branch information
Jirka Fajfr committed Sep 20, 2016
1 parent a43dc10 commit 379ca3b
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 379ca3b

Please sign in to comment.