Changed status check for cTLD dot BE since whois information return change
Benjamin Renard

Benjamin Renard commited on 2012-04-11 12:23:32
Showing 1 changed files, with 3 additions and 3 deletions.

... ...
@@ -36,13 +36,13 @@ case $TLD in
36 36
 		fi
37 37
 	;;
38 38
 	be)
39
-		STATUS="`echo -e "$WHOIS"|grep "^Status:"|awk '{print $2}'`"
39
+		STATUS="`echo -e "$WHOIS"|grep "^Status:"|sed 's/Status:[ \t]*//'`"
40 40
 		[ $DEBUG -eq 1 ] && echo "Status : $STATUS"
41 41
 		SINCE="`echo -e "$WHOIS"|grep "^Registered:"|sed 's/^Registered: *//'`"
42 42
 		[ $DEBUG -eq 1 ] && echo "Since : $SINCE"
43
-		if [ "$STATUS" != "REGISTERED" ]
43
+		if [ "$STATUS" != "REGISTERED" -a "$STATUS" != "NOT AVAILABLE" ]
44 44
 		then
45
-			echo "CRITICAL : $DOMAIN status is not REGISTERED (value : $STATUS)"
45
+			echo "CRITICAL : $DOMAIN status is not REGISTERED or NOT AVAILABLE (value : $STATUS)"
46 46
 			exit 2
47 47
 		else
48 48
 			echo "OK : $DOMAIN registered since $SINCE"
49 49