check_ircd: improve cross-POSIX-platform support

This commit is contained in:
sceox 2021-11-17 20:10:44 -08:00
parent 5f96921697
commit a2dbf25076

View File

@ -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"