]> gitweb.fluxo.info Git - puppet-domain_check.git/commitdiff
Lookup fix for .info domains
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 24 Feb 2014 21:11:03 +0000 (18:11 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 24 Feb 2014 21:11:03 +0000 (18:11 -0300)
files/domain-check

index 2342bc2cb52dc363685fbe01a642e70b88b1bf88..bb9e0b141d9c2700249e2039c23ed079bc56c241 100755 (executable)
@@ -4,10 +4,13 @@
 #
 # Author: Matty < matty91 at gmail dot com >
 # 
-# Current Version: 1.12
+# Current Version: 1.14
 #
 # Revision History:
 #
+#  Version 1.14
+#    Lookup fix for .info domains.
+#
 #  Version 1.13
 #    Another lookup fix for .org domains.
 #
@@ -309,10 +312,10 @@ check_domain_status()
     # The whois Expiration data should resemble the following: "Expiration Date: 09-may-2008"
 
     # for .in, .info, .org domains
-    if [ "${TLDTYPE}" == "org" ];
+    if [ "${TLDTYPE}" == "org" -o "${TLDTYPE}" == "info" ];
     then
            DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -d':' -f1 | sed -e 's/T.*$//'`
-    elif [ "${TLDTYPE}" == "in" -o "${TLDTYPE}" == "info" ];
+    elif [ "${TLDTYPE}" == "in" ];
     then
            DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration Date:/ { print $2 }' | cut -d':' -f2`
     elif [ "${TLDTYPE}" == "biz" ]; # for .biz domain
@@ -364,7 +367,7 @@ check_domain_status()
               DOMAINJULIAN=`$DATE -d ${DOMAINDATE} "+%-m %-d %-Y"`
               DOMAINJULIAN=`date2julian ${DOMAINJULIAN}`
             fi
-    elif [ "${TLDTYPE}" == "org" ]; # for .org domain
+    elif [ "${TLDTYPE}" == "org" -o "${TLDTYPE}" == "info" ]; # for .org and info domains
     then
             # Whois data should be in the following format: "2006-02-13"
             YEAR=$(echo $DOMAINDATE  | cut -d '-' -f 1)