X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/9d27360314f8e4e9844cde4059f98fac52250d36..19aeb7bfffb852ab8be005c004b1ef8e555a5b77:/cookbooks/munin/providers/plugin.rb diff --git a/cookbooks/munin/providers/plugin.rb b/cookbooks/munin/providers/plugin.rb index e469acb6d..23b9753d8 100644 --- a/cookbooks/munin/providers/plugin.rb +++ b/cookbooks/munin/providers/plugin.rb @@ -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