From d9de7c5034cbadb84a5a18968484a9b686fa4df8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 7 Jul 2013 11:19:03 +0100 Subject: [PATCH] Allow the target of a munin plugin to be a full path --- cookbooks/munin/definitions/munin_plugin.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}" -- 2.43.2