From: Silvio Rhatto Date: Mon, 3 Feb 2014 13:54:55 +0000 (-0200) Subject: Fix .org lookup X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=239bea3a2b3fa9ebb0de7343d53dc420b57a8e3f;p=puppet-domain_check.git Fix .org lookup --- diff --git a/files/domain-check b/files/domain-check index 89a39f8..ec5be77 100755 --- a/files/domain-check +++ b/files/domain-check @@ -301,7 +301,10 @@ check_domain_status() # The whois Expiration data should resemble the following: "Expiration Date: 09-may-2008" # for .in, .info, .org domains - if [ "${TLDTYPE}" == "in" -o "${TLDTYPE}" == "info" -o "${TLDTYPE}" == "org" ]; + if [ "${TLDTYPE}" == "org" ]; + then + DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -d':' -f2` + elif [ "${TLDTYPE}" == "in" -o "${TLDTYPE}" == "info" ]; then DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration Date:/ { print $2 }' | cut -d':' -f2` elif [ "${TLDTYPE}" == "biz" ]; # for .biz domain