]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/providers/plugin.rb
Add a new Squid graph to count the IPs being delayed due to no-referer, and restrict...
[chef.git] / cookbooks / munin / providers / plugin.rb
index e469acb6d1610a70e4d8c7d3a74f9189c666b1fa..23b9753d87428d0ca87a9627c37cac907d2b3118 100644 (file)
@@ -39,6 +39,7 @@ action :create do
       cookbook new_resource.conf_cookbook
       template new_resource.conf
       variables new_resource.conf_variables
+      restart_munin false
     end
   end
 end
@@ -51,6 +52,7 @@ action :delete do
   if new_resource.conf # ~FC023
     munin_plugin_conf new_resource.name do
       action :delete
+      restart_munin false
     end
   end
 end
@@ -60,12 +62,11 @@ def plugin_path
 end
 
 def target_path
-  case
-  when ::File.exist?(target)
+  if ::File.exist?(target)
     target
-  when ::File.exist?("/usr/local/share/munin/plugins/#{target}")
+  elsif ::File.exist?("/usr/local/share/munin/plugins/#{target}")
     "/usr/local/share/munin/plugins/#{target}"
-  when ::File.exist?("/usr/share/munin/plugins/#{target}")
+  elsif ::File.exist?("/usr/share/munin/plugins/#{target}")
     "/usr/share/munin/plugins/#{target}"
   end
 end