Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- batch 'run commnad' do
- cwd target_path + '/bin/win64'
- code 'command to be executed'
- not_if '::Win32::Service.exists?("Service name")'
- end
- if !::Win32::Service.exists?("Service name") then
- batch 'Install zabbix agent' do
- cwd target_path + '/bin/win64'
- code 'command to be executed'
- end
- end
- not_if { Win32::Service.exists?("Service name") }
- require 'win32/service'
- windows_service "jenkins" do
- action [:stop, :disable]
- only_if { ::Win32::Service.exists?("jenkins")}
- end
Add Comment
Please, Sign In to add comment