X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins-scripts%2Fcheck_ircd.pl;h=42a9bca91601546d05ba7ee9fea85a83b56f44e3;hb=4bb8e2f51481338f7381b48186502519863399aa;hp=3fbce2e43b1881344653487d421ded19503900bc;hpb=bc3c8c7cfbdbce716e8987bee211f69911ea8db2;p=nagiosplug.git diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 3fbce2e..42a9bca 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl @@ -187,19 +187,19 @@ MAIN: if ($opt_h) {print_help(); exit $ERRORS{'OK'};} - ($opt_H) || ($opt_H = shift) || usage("Host name/address not specified\n"); + ($opt_H) || ($opt_H = shift @ARGV) || usage("Host name/address not specified\n"); my $remotehost = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); ($remotehost) || usage("Invalid host: $opt_H\n"); - ($opt_w) || ($opt_w = shift) || ($opt_w = 50); + ($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 50); my $warn = $1 if ($opt_w =~ /^([0-9]+)$/); ($warn) || usage("Invalid warning threshold: $opt_w\n"); - ($opt_c) || ($opt_c = shift) || ($opt_c = 100); + ($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 100); my $crit = $1 if ($opt_c =~ /^([0-9]+)$/); ($crit) || usage("Invalid critical threshold: $opt_c\n"); - ($opt_p) || ($opt_p = shift) || ($opt_p = 6667); + ($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = 6667); my $remoteport = $1 if ($opt_p =~ /^([0-9]+)$/); ($remoteport) || usage("Invalid port: $opt_p\n");