cookbooks/mu-splunk/recipes/upgrade.rb in cloud-mu-2.0.0.pre.alpha7 vs cookbooks/mu-splunk/recipes/upgrade.rb in cloud-mu-2.0.0.pre.alpha8
- old
+ new
@@ -27,22 +27,22 @@
service 'splunk_stop' do
if node['platform_family'] != 'windows'
service_name 'splunk'
provider Chef::Provider::Service::Init
- only_if { ::File.exists?("/etc/init.d/splunk") }
+ only_if { ::File.exist?("/etc/init.d/splunk") }
else
service_name 'SplunkForwarder'
provider Chef::Provider::Service::Windows
timeout 90
retries 3
retry_delay 10
supports :status => false, :restart => false
start_command "c:/Windows/system32/sc.exe start SplunkForwarder"
stop_command "c:/Windows/system32/sc.exe stop SplunkForwarder"
pattern "splunkd.exe"
- only_if { ::Dir.exists?("c:/Program Files/SplunkUniversalForwarder") }
+ only_if { ::Dir.exist?("c:/Program Files/SplunkUniversalForwarder") }
not_if { ::Dir.glob("c:/Program Files/SplunkUniversalForwarder/splunkforwarder-#{node['splunk']['preferred_version']}-*").size > 0 }
end
supports :status => true
action :stop
end
@@ -59,10 +59,10 @@
$arg2 = "/quiet"
msiexec $arg1 $arg2
}
EOH
not_if { ::Dir.glob("c:/Program Files/SplunkUniversalForwarder/splunkforwarder-#{node['splunk']['preferred_version']}-*").size > 0 }
- only_if { ::Dir.exists?("c:/Program Files/SplunkUniversalForwarder") }
+ only_if { ::Dir.exist?("c:/Program Files/SplunkUniversalForwarder") }
end
end