scripts/domain-check
changeset 25 4cbcc8af8481
parent 24 3beb0ea9ca69
equal deleted inserted replaced
24:3beb0ea9ca69 25:4cbcc8af8481
   319                    	 *)     tmonth=0   ;;
   319                    	 *)     tmonth=0   ;;
   320     		    esac
   320     		    esac
   321                 tday=$(echo ${tdomdate} | ${cut} -d'/' -f3)
   321                 tday=$(echo ${tdomdate} | ${cut} -d'/' -f3)
   322     	        domainDate=$(echo $tday-$tmonth-$tyear)
   322     	        domainDate=$(echo $tday-$tmonth-$tyear)
   323                 ;;
   323                 ;;
   324         "cz")   whoisVal=$(${whois} -h "${whoisServer}" "${1}")
   324         "cz")   [[ -n ${domainPoll[$tldType]} ]] && sleep 20
   325                 registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2)
   325                 whoisVal=$(${whois} -h "whois.nic.cz" "${1}")
   326         	    tdomdate=$(echo "${whoisVal}" | awk '/expire:/ { print $2 }')
   326                 registrar=$(echo "$whoisVal" | grep "registrar:" | head -1 | cut -d':' -f2 | sed -e 's/^ *//' -e 's/ *$//')
       
   327                 tdomdate=$(echo "${whoisVal}" | awk '/expire:/ { print $2 }')
   327                 tyear=$(echo ${tdomdate} | cut -d'.' -f3)
   328                 tyear=$(echo ${tdomdate} | cut -d'.' -f3)
   328                 tmon=$(echo ${tdomdate} | cut -d'.' -f2)
   329                 tmon=$(echo ${tdomdate} | cut -d'.' -f2)
   329                 tday=$(echo ${tdomdate} | cut -d'.' -f1)
   330                 tday=$(echo ${tdomdate} | cut -d'.' -f1)
   330                 case ${tmon} in
   331                 case ${tmon} in
   331                     1|01) tmonth=jan ;;
   332                     1|01) tmonth=jan ;;
   340                     10)   tmonth=oct ;;
   341                     10)   tmonth=oct ;;
   341                     11)   tmonth=nov ;;
   342                     11)   tmonth=nov ;;
   342                     12)   tmonth=dec ;;
   343                     12)   tmonth=dec ;;
   343                     *)    tmonth=0   ;;
   344                     *)    tmonth=0   ;;
   344                 esac
   345                 esac
   345     	        domainDate=$(echo $tday-$tmonth-$tyear)
   346                 domainDate=$(echo $tday-$tmonth-$tyear)
   346                 ;;
   347                 ;;
   347         *)      whoisVal=$(${whois} -h "${whoisServer}" "${1}")
   348         *)      whoisVal=$(${whois} -h "${whoisServer}" "${1}")
   348                 registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2)
   349                 registrar=$(echo "$whoisVal" | grep "Sponsoring Registrar:" | cut -d':' -f2)
   349                 domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration/ { print $NF }')
   350                 domainDate=$(echo "${whoisVal}" | ${awk} '/Expiration/ { print $NF }')
   350                 ;;
   351                 ;;