X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-config;h=4a59c65b2b2f343713a4a113be667b3b64a02db8;hb=a62cb26cd7c039376902262c6ac7cc9e5c2e139d;hp=0d624028ffbe68664302ee2eb496f797c13a5d2c;hpb=42e99da9d896a33803e763c746e9a103183b6b34;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-config b/dsa-nagios-checks/checks/dsa-check-config index 0d62402..4a59c65 100755 --- a/dsa-nagios-checks/checks/dsa-check-config +++ b/dsa-nagios-checks/checks/dsa-check-config @@ -9,13 +9,13 @@ set -e err=0 log() { - if [ "$0" == "ok" ] && [ "$err" == 0 ]; then + if [ "$0" = "ok" ] && [ "$err" = 0 ]; then err=0 - elif [ "$1" == "warn" ] && [ "$err" -lt 1 ]; then + elif [ "$1" = "warn" ] && [ "$err" -lt 1 ]; then err=1 - elif [ "$1" == "critical" ] && [ "$err" -lt 2 ]; then + elif [ "$1" = "critical" ] && [ "$err" -lt 2 ]; then err=2 - elif [ "$1" == "unknown" ] && [ "$err" == 0 ]; then + elif [ "$1" = "unknown" ] && [ "$err" = 0 ]; then err=3 fi if [ "`eval echo \\$$1`" = "" ]; then @@ -48,7 +48,7 @@ check_ldap_conf() { if egrep '^URI.*ldap://db.debian.org' /etc/ldap/ldap.conf > /dev/null && egrep '^BASE.*dc=debian,dc=org' /etc/ldap/ldap.conf > /dev/null && - egrep '^TLS_CACERT.*/etc/ssl/certs/spi-cacert-2008.pem' /etc/ldap/ldap.conf > /dev/null && + egrep '^TLS_CACERT.*/etc/ssl/servicecerts/db.debian.org.crt' /etc/ldap/ldap.conf > /dev/null && egrep '^TLS_REQCERT.*hard' /etc/ldap/ldap.conf > /dev/null ; then log ok "ldap.conf configured properly" return