1
0
Fork 0

nagios/glue_records: small corr.

This commit is contained in:
Chl 2020-01-05 21:29:44 +01:00
parent 8e37cb2478
commit 554bebfe59

View file

@ -102,8 +102,7 @@ while [ "$#" -gt 0 ]; do
fi
for IPADDR in $LIST_IP_NS_SERVERS; do
# Query our server
OUTPUT=$( dig @"$IPADDR" $DOMAIN SOA +short 2>&1 )
if [ "$?" -eq 0 ]; then
if OUTPUT=$( dig @"$IPADDR" $DOMAIN SOA +short 2>&1 ); then
# The server responded, store the SOA for later analyze
LIST_SOA="$( printf "%s\n%s" "$LIST_SOA" "$OUTPUT" | grep -v "^$" )"
else
@ -112,7 +111,7 @@ while [ "$#" -gt 0 ]; do
OUTPUT_DETAIL_CRITICAL="Problematic server behind IP"
OUTPUT_EXIT_STATUS=$STATE_CRITICAL
fi
OUTPUT_DETAIL_CRITICAL="$OUTPUT_DETAIL_CRITICAL $IPADDRESS"
OUTPUT_DETAIL_CRITICAL="$OUTPUT_DETAIL_CRITICAL $IPADDR"
fi
done