Guest User

Untitled

a guest
Aug 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. batch 'run commnad' do
  2. cwd target_path + '/bin/win64'
  3. code 'command to be executed'
  4. not_if '::Win32::Service.exists?("Service name")'
  5. end
  6.  
  7. if !::Win32::Service.exists?("Service name") then
  8. batch 'Install zabbix agent' do
  9. cwd target_path + '/bin/win64'
  10. code 'command to be executed'
  11. end
  12. end
  13.  
  14. not_if { Win32::Service.exists?("Service name") }
  15.  
  16. require 'win32/service'
  17. windows_service "jenkins" do
  18. action [:stop, :disable]
  19. only_if { ::Win32::Service.exists?("jenkins")}
  20. end
Add Comment
Please, Sign In to add comment