]> gitweb.fluxo.info Git - puppet-domain_check.git/commitdiff
Fix .org lookup
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Feb 2014 13:54:55 +0000 (11:54 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Feb 2014 13:54:55 +0000 (11:54 -0200)
files/domain-check

index 89a39f842a3dd81baa827cb4a5bad69b77a5ba0c..ec5be771966bc7f1b411e8acd42926bb88a6723e 100755 (executable)
@@ -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