projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e873a47
)
Allow the target of a munin plugin to be a full path
author
Tom Hughes
<tom@compton.nu>
Sun, 7 Jul 2013 10:19:03 +0000
(11:19 +0100)
committer
Tom Hughes
<tom@compton.nu>
Sun, 7 Jul 2013 10:19:03 +0000
(11:19 +0100)
cookbooks/munin/definitions/munin_plugin.rb
patch
|
blob
|
history
diff --git
a/cookbooks/munin/definitions/munin_plugin.rb
b/cookbooks/munin/definitions/munin_plugin.rb
index a44da4f1e2154a9db8827e0e17f7498c03325f01..beee646fa2a844b4ea4f2012d3e65dda9378b18c 100644
(file)
--- 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}"