From a2dbf250761082ee38f2437329f8c64252d572c8 Mon Sep 17 00:00:00 2001 From: sceox Date: Wed, 17 Nov 2021 20:10:44 -0800 Subject: [PATCH] check_ircd: improve cross-POSIX-platform support --- check_ircd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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"