X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fexec-nagios.px;h=a9f466338cdabe4c8a692065b03d39c63a7bb9a6;hb=9c98fa31ef50a6ff849d36cac4f5297faa6f7909;hp=3a8472413c53da140aad6d0c749628b23ad57d29;hpb=9d5a7847b03d78a94b6a0b153abeb630b4b94ddd;p=collectd.git 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