projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e57613
)
contrib/exec-nagios.px: Make it possible to run the same script multiple times.
author
Tom Throckmorton
<throck@gmail.com>
Fri, 6 Mar 2009 18:28:26 +0000
(19:28 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Fri, 6 Mar 2009 18:28:26 +0000
(19:28 +0100)
contrib/exec-nagios.px
patch
|
blob
|
history
diff --git
a/contrib/exec-nagios.px
b/contrib/exec-nagios.px
index
3a84724
..
a9f4663
100755
(executable)
--- a/
contrib/exec-nagios.px
+++ b/
contrib/exec-nagios.px
@@
-123,8
+123,20
@@
sub handle_config_script
}
else
{
- $opts->{'script'} = $script;
- push (@$Scripts, $opts);
+ if (ref ($opts) eq 'ARRAY')
+ {
+ for (@$opts)
+ {
+ my $opt = $_;
+ $opt->{'script'} = $script;
+ push (@$Scripts, $opt);
+ }
+ }
+ else
+ {
+ $opts->{'script'} = $script;
+ push (@$Scripts, $opts);
+ }
}
} # for (keys %$scripts)
} # handle_config_script