Skip to content

Commit

Permalink
Merge pull request #330 from jirkafajfr/master
Browse files Browse the repository at this point in the history
Support of consul config reload on windows platform
  • Loading branch information
johnbellone committed Jul 1, 2016
2 parents 2876c5e + 205acfc commit 6a67b68
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions libraries/consul_service_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ def action_enable
end

def action_reload
Chef::Log.info 'The service provider for Consul on Windows does not support reload!'
notifying_block do
execute 'Reload consul' do
command 'consul.exe reload'
cwd ::File.dirname(new_resource.program)
action :run
end
end
end

def action_restart
powershell_script 'Restart consul' do
code 'restart-service consul'
notifying_block do
powershell_script 'Restart consul' do
code 'restart-service consul'
end
end
end

Expand Down

0 comments on commit 6a67b68

Please sign in to comment.