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
|
botname=nagiosbot
|
||||||
host=localhost
|
host=localhost
|
||||||
@ -28,7 +28,8 @@ function delay {
|
|||||||
|
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
echo "NICK $botname
|
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=$?
|
exit=$?
|
||||||
if [ ! "$exit" == 0 ]; then
|
if [ ! "$exit" == 0 ]; then
|
||||||
echo "IRCd CRITICAL: $host: connection failed"
|
echo "IRCd CRITICAL: $host: connection failed"
|
||||||
|
Reference in New Issue
Block a user