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