aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-09-10 12:01:50 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-09-10 12:01:50 -0300
commitdbeccdc0564b48bbededf29a3f70aa30481b0350 (patch)
treeca97b839c4fa0759ceaa301636d3a10594cddb1b /files
parent2ae76f9e0e2e297f19d5e3c38db0c69f29e7ea57 (diff)
downloadpuppet-nodo-dbeccdc0564b48bbededf29a3f70aa30481b0350.tar.gz
puppet-nodo-dbeccdc0564b48bbededf29a3f70aa30481b0350.tar.bz2
Added support for .is domains
Diffstat (limited to 'files')
-rwxr-xr-xfiles/bin/domain-check21
1 files changed, 15 insertions, 6 deletions
diff --git a/files/bin/domain-check b/files/bin/domain-check
index 5abb30c..89a39f8 100755
--- a/files/bin/domain-check
+++ b/files/bin/domain-check
@@ -9,8 +9,11 @@
# Revision History:
#
# Version 1.11
-# Fixing mail program path -- Silvio Rhatto <rhatto at riseup dot net>
-# Fixing output for .br domains when expiry date is not available -- Silvio Rhatto <rhatto at riseup dot net>
+# Added support for .is domains
+# Fixing mail program path
+# Fixing output for .br domains when expiry date is not available
+# Fixing awk usage
+# -- Silvio Rhatto <rhatto at riseup dot net>
#
# Version 1.10
# Do not add extra line on quiet mode -- Silvio Rhatto <rhatto at riseup dot net>
@@ -283,6 +286,9 @@ check_domain_status()
elif [ "${TLDTYPE}" == "br" ];
then
REGISTRAR="registro.br"
+ elif [ "${TLDTYPE}" == "is" ];
+ then
+ REGISTRAR="`cat ${WHOIS_TMP} | ${AWK} '/source:/ { print $2 }' | uniq`"
fi
# If the Registrar is NULL, then we didn't get any data
@@ -300,13 +306,16 @@ check_domain_status()
DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration Date:/ { print $2 }' | cut -d':' -f2`
elif [ "${TLDTYPE}" == "biz" ]; # for .biz domain
then
- DOMAINDATE=`cat ${WHOIS_TMP} | awk '/Domain Expiration Date:/ { print $6"-"$5"-"$9 }'`
+ DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Domain Expiration Date:/ { print $6"-"$5"-"$9 }'`
elif [ "${TLDTYPE}" == "uk" ]; # for .uk domain
then
- DOMAINDATE=`cat ${WHOIS_TMP} | awk '/Renewal date:/ { print $3 }'`
+ DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Renewal date:/ { print $3 }'`
elif [ "${TLDTYPE}" == "br" ]; # for .br domain
then
- DOMAINDATE=`cat ${WHOIS_TMP} | awk '/expires:/ { print $2 }'`
+ DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/expires:/ { print $2 }'`
+ elif [ "${TLDTYPE}" == "is" ]; # for .is domain
+ then
+ DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/expires:/ { print $3"-"$2"-"$4 }'`
elif [ "${TLDTYPE}" == "jp" ]; # for .jp 2010/04/30
then
tdomdate=`cat ${WHOIS_TMP} | awk '/Expires on/ { print $3 }'`
@@ -333,7 +342,7 @@ check_domain_status()
DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration/ { print $NF }'`
fi
- #echo $DOMAINDATE # debug
+ #echo $DOMAINDATE # debug
if [ "${TLDTYPE}" == "br" ]; # for .br domain
then
# If registro.br outputs in reduced mode when query limits are