Fix #1: Commit 4bccc75 broke .cz domains
authorTomas Zeman <tzeman@volny.cz>
Tue, 09 Jul 2013 12:08:33 +0200
changeset 25 4cbcc8af8481
parent 24 3beb0ea9ca69
child 27 e8cb759c60b4
Fix #1: Commit 4bccc75 broke .cz domains
scripts/domain-check
--- a/scripts/domain-check	Tue Jul 09 09:17:48 2013 +0200
+++ b/scripts/domain-check	Tue Jul 09 12:08:33 2013 +0200
@@ -321,9 +321,10 @@
                 tday=$(echo ${tdomdate} | ${cut} -d'/' -f3)
     	        domainDate=$(echo $tday-$tmonth-$tyear)
                 ;;
-        "cz")   whoisVal=$(${whois} -h "${whoisServer}" "${1}")
-                registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2)
-        	    tdomdate=$(echo "${whoisVal}" | awk '/expire:/ { print $2 }')
+        "cz")   [[ -n ${domainPoll[$tldType]} ]] && sleep 20
+                whoisVal=$(${whois} -h "whois.nic.cz" "${1}")
+                registrar=$(echo "$whoisVal" | grep "registrar:" | head -1 | cut -d':' -f2 | sed -e 's/^ *//' -e 's/ *$//')
+                tdomdate=$(echo "${whoisVal}" | awk '/expire:/ { print $2 }')
                 tyear=$(echo ${tdomdate} | cut -d'.' -f3)
                 tmon=$(echo ${tdomdate} | cut -d'.' -f2)
                 tday=$(echo ${tdomdate} | cut -d'.' -f1)
@@ -342,7 +343,7 @@
                     12)   tmonth=dec ;;
                     *)    tmonth=0   ;;
                 esac
-    	        domainDate=$(echo $tday-$tmonth-$tyear)
+                domainDate=$(echo $tday-$tmonth-$tyear)
                 ;;
         *)      whoisVal=$(${whois} -h "${whoisServer}" "${1}")
                 registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2)