Code

configure, src/Makefile: Check for nanosleep() in libposix4 as well.
[collectd.git] / contrib / exec-nagios.px
index 3a8472413c53da140aad6d0c749628b23ad57d29..a9f466338cdabe4c8a692065b03d39c63a7bb9a6 100755 (executable)
@@ -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