]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Added support for .is domains
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 10 Sep 2012 15:01:50 +0000 (12:01 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 10 Sep 2012 15:01:50 +0000 (12:01 -0300)
files/bin/domain-check

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