X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=contrib%2Fexec-nagios.px;fp=contrib%2Fexec-nagios.px;h=a9f466338cdabe4c8a692065b03d39c63a7bb9a6;hp=3a8472413c53da140aad6d0c749628b23ad57d29;hb=a025295971e7f8d88764c7d54fb29379b9f29b8d;hpb=4e57613ae19a71a0f180f0648223a139f48c932c diff --git a/contrib/exec-nagios.px b/contrib/exec-nagios.px index 3a847241..a9f46633 100755 --- 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