Code

Fix for regex input of '|', being output causing problems with Nagios' parsing of
[nagiosplug.git] / contrib / check_dns_random.pl
index 787d464413bce1adec9c5641fb3023e4a50ffe43..4bed4120a30d0adb24973802e1fd854b226155bb 100644 (file)
@@ -55,9 +55,8 @@ $wc =~ s/domains//g;
 $x = rand $wc;
 ($z,$y) = split(/\./,$x);
 
-print `$check $data[$z] $host`;
-
-
+system($check, $data[$z], $host);
+exit ($? / 256);
 
 sub usage
 {