Skip to content

Commit

Permalink
- Support of consul config reload on windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Jirka Fajfr committed Jun 17, 2016
1 parent 2d83d6e commit 205acfc
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 205acfc

Please sign in to comment.