diff options
Diffstat (limited to 'files/domain-check')
-rwxr-xr-x | files/domain-check | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/files/domain-check b/files/domain-check index b2df60b..2342bc2 100755 --- a/files/domain-check +++ b/files/domain-check @@ -8,6 +8,9 @@ # # Revision History: # +# Version 1.13 +# Another lookup fix for .org domains. +# # Version 1.12 # Fix lookup for .org domains. # @@ -308,7 +311,7 @@ check_domain_status() # for .in, .info, .org domains if [ "${TLDTYPE}" == "org" ]; then - DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -d':' -f2` + DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -d':' -f1 | sed -e 's/T.*$//'` elif [ "${TLDTYPE}" == "in" -o "${TLDTYPE}" == "info" ]; then DOMAINDATE=`cat ${WHOIS_TMP} | ${AWK} '/Expiration Date:/ { print $2 }' | cut -d':' -f2` @@ -361,6 +364,15 @@ check_domain_status() DOMAINJULIAN=`$DATE -d ${DOMAINDATE} "+%-m %-d %-Y"` DOMAINJULIAN=`date2julian ${DOMAINJULIAN}` fi + elif [ "${TLDTYPE}" == "org" ]; # for .org domain + then + # Whois data should be in the following format: "2006-02-13" + YEAR=$(echo $DOMAINDATE | cut -d '-' -f 1) + MONTH=$(echo $DOMAINDATE | cut -d '-' -f 2) + DAY=$(echo $DOMAINDATE | cut -d '-' -f 3) + + # Convert the date to seconds + DOMAINJULIAN=$(date2julian ${MONTH} ${DAY} ${YEAR}) else # Whois data should be in the following format: "13-feb-2006" IFS="-" |