check_ircd: improve cross-POSIX-platform support
This commit is contained in:
parent
5f96921697
commit
a2dbf25076
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
botname=nagiosbot
|
||||
host=localhost
|
||||
@ -28,7 +28,8 @@ function delay {
|
||||
|
||||
SECONDS=0
|
||||
echo "NICK $botname
|
||||
USER $botname 8 * : $botname" | nc -i 1 -q $crit -w $crit $host $port 2>&1 > /dev/null
|
||||
USER $botname 8 * : $botname
|
||||
QUIT" | nc -i 1 -w $crit $host $port 2>&1 > /dev/null
|
||||
exit=$?
|
||||
if [ ! "$exit" == 0 ]; then
|
||||
echo "IRCd CRITICAL: $host: connection failed"
|
||||
|
Reference in New Issue
Block a user