diff -r 8eaecffd197a -r 127a8c6d6e72 check_smtp_conn.sh --- a/check_smtp_conn.sh Wed Dec 19 22:31:20 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#! /bin/bash -PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin -EXIM=$(command -v exim4 || command -v exim) - -smtp_accept_max=$(set -- $($EXIM -bP smtp_accept_max); echo $3) -warn=$((smtp_accept_max * 7 / 10)) -crit=$smtp_accept_max - -tmp=$(getopt -n $0 -o w:c: -- "$@") -eval set -- $tmp - -while : -do - opt="$1"; shift - case "$opt" in - -w) warn="$1"; shift;; - -c) crit="$1"; shift;; - --) break;; - esac -done - -r=$(($(exiwhat | wc -l) -1 )) -p="connections=$r;$warn;$crit" - - -test $r -gt $crit && { echo "CRIT ($r connections)|$p"; exit 2; } -test $r -gt $warn && { echo "WARN ($r connections)|$p"; exit 1; } -echo "OK ($r connections)|$p" -exit 0