diff --git a/check_ircd b/check_ircd index 95cbb82..1b34aee 100755 --- a/check_ircd +++ b/check_ircd @@ -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"