X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7b9ec4b60ee39614d1d083d7220e76b07d2b275f..5cffb5b0ddf35b84074a81929f05982d76a13008:/cookbooks/munin/definitions/munin_plugin.rb diff --git a/cookbooks/munin/definitions/munin_plugin.rb b/cookbooks/munin/definitions/munin_plugin.rb index a44da4f1e..beee646fa 100644 --- a/cookbooks/munin/definitions/munin_plugin.rb +++ b/cookbooks/munin/definitions/munin_plugin.rb @@ -20,7 +20,9 @@ define :munin_plugin, :action => :create do target = params[:target] || params[:name] - if File.exists?("/usr/local/share/munin/plugins/#{target}") + if File.exists?(target) + target_path = target + elsif File.exists?("/usr/local/share/munin/plugins/#{target}") target_path = "/usr/local/share/munin/plugins/#{target}" elsif File.exists?("/usr/share/munin/plugins/#{target}") target_path = "/usr/share/munin/plugins/#{target}"