diff options
Diffstat (limited to 'plugins-scripts/check_ircd.pl')
-rwxr-xr-x | plugins-scripts/check_ircd.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl index 22d21c2e..84f20229 100755 --- a/plugins-scripts/check_ircd.pl +++ b/plugins-scripts/check_ircd.pl | |||
@@ -60,7 +60,7 @@ sub print_usage (); | |||
60 | sub connection ($$$$); | 60 | sub connection ($$$$); |
61 | sub bindRemote ($$); | 61 | sub bindRemote ($$); |
62 | 62 | ||
63 | # -------------------------------------------------------------[ Enviroment ]-- | 63 | # -------------------------------------------------------------[ Environment ]-- |
64 | 64 | ||
65 | $ENV{'PATH'}='@TRUSTED_PATH@'; | 65 | $ENV{'PATH'}='@TRUSTED_PATH@'; |
66 | $ENV{'BASH_ENV'}=''; | 66 | $ENV{'BASH_ENV'}=''; |
@@ -69,7 +69,9 @@ $ENV{'ENV'}=''; | |||
69 | # -----------------------------------------------------------------[ Global ]-- | 69 | # -----------------------------------------------------------------[ Global ]-- |
70 | 70 | ||
71 | $PROGNAME = "check_ircd"; | 71 | $PROGNAME = "check_ircd"; |
72 | my $NICK="ircd$$"; | 72 | # nickname shouldn't be longer than 9 chars, this might happen with large PIDs |
73 | # To prevent this, we cut of the part over 10000 | ||
74 | my $NICK="ircd" . $$ % 10000; | ||
73 | my $USER_INFO="monitor localhost localhost : "; | 75 | my $USER_INFO="monitor localhost localhost : "; |
74 | 76 | ||
75 | # -------------------------------------------------------------[ connection ]-- | 77 | # -------------------------------------------------------------[ connection ]-- |
@@ -206,7 +208,7 @@ MAIN: | |||
206 | 208 | ||
207 | # Just in case of problems, let's not hang the monitoring system | 209 | # Just in case of problems, let's not hang the monitoring system |
208 | $SIG{'ALRM'} = sub { | 210 | $SIG{'ALRM'} = sub { |
209 | print "Somthing is Taking a Long Time, Increase Your TIMEOUT (Currently Set At $TIMEOUT Seconds)\n"; | 211 | print "Something is Taking a Long Time, Increase Your TIMEOUT (Currently Set At $TIMEOUT Seconds)\n"; |
210 | exit $ERRORS{"UNKNOWN"}; | 212 | exit $ERRORS{"UNKNOWN"}; |
211 | }; | 213 | }; |
212 | 214 | ||