summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-02-24 18:11:03 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-02-24 18:11:03 -0300
commit4ae019b4cd716016b460d6f593d257381b29212a (patch)
tree06014390477a140d54148cfe5367653bf8397381
parenta2067fe4e3ac691234cf95379e14d358fcc9afc5 (diff)
downloadpuppet-domain_check-4ae019b4cd716016b460d6f593d257381b29212a.tar.gz
puppet-domain_check-4ae019b4cd716016b460d6f593d257381b29212a.tar.bz2
Lookup fix for .info domains
-rwxr-xr-xfiles/domain-check11
1 files changed, 7 insertions, 4 deletions
diff --git a/files/domain-check b/files/domain-check
index 2342bc2..bb9e0b1 100755
--- a/files/domain-check
+++ b/files/domain-check
@@ -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)