From ff24f461148e25837653eb1ca3d78ed0b0a75491 Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 17 Nov 2010 12:08:37 -0800 Subject: [PATCH] Stop splunk before overwriting it, don't stop chef if splunk isn't running --- chef/cookbooks/common/recipes/splunk.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chef/cookbooks/common/recipes/splunk.rb b/chef/cookbooks/common/recipes/splunk.rb index 27067993b..f66a95863 100644 --- a/chef/cookbooks/common/recipes/splunk.rb +++ b/chef/cookbooks/common/recipes/splunk.rb @@ -6,6 +6,10 @@ execute "Untar splunk" do command "cd /tmp/install && tar -xvf splunk-4.1.5-85165-Linux-x86_64.tgz" end +execute "Stop old splunk" do + command "/opt/splunk/bin/splunk stop || true" +end + execute "Remove old splunk" do command "rm -rf /opt/splunk" end