Skip to content

Commit

Permalink
Merge pull request #443 from legal90/fix-service-restart
Browse files Browse the repository at this point in the history
Remove the notification for consul service restart
  • Loading branch information
legal90 committed May 27, 2017
2 parents c2fa244 + 6e36381 commit 95be769
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
#
node.default['nssm']['install_location'] = '%WINDIR%'

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 { node.platform_family?('windows') }
not_if { node['consul']['service_user'] == 'root' }
not_if { node['consul']['create_service_user'] == false }
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 95be769

Please sign in to comment.