From: Tom Hughes Date: Sun, 7 Jul 2013 10:19:03 +0000 (+0100) Subject: Allow the target of a munin plugin to be a full path X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/d9de7c5034cbadb84a5a18968484a9b686fa4df8?ds=sidebyside Allow the target of a munin plugin to be a full path --- 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}"