Skip to content

Commit

Permalink
Merge pull request #8 from honzahommer/feat/support-cz-domain
Browse files Browse the repository at this point in the history
feat: add .cz domain support
  • Loading branch information
ewypych authored Jun 1, 2019
2 parents 6a74bcc + 6e011cd commit 1c31ed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Supported Top-level Domains
* se
* asia
* art
* cz

License
-------
Expand Down
4 changes: 4 additions & 0 deletions check_domain_expiration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ check_domain()
EXDATE=$(${WHOIS} -h whois.dns.pl "${1}" | ${AWK} '/expiration date:/ { gsub("[:.]","-"); print $3 }')
fi
EXP_DAYS=$(( ( $(date -ud ${EXDATE} +'%s') - $(date -ud `date +%Y-%m-%d` +'%s') )/60/60/24 ))
elif [ "$DTYPE" == "cz" ]
then
EXDATE=$(${WHOIS} -h whois.nic.cz "${1}" | ${AWK} '/expire:/ { gsub("[.]","/",$2); print $2 }')
EXP_DAYS=$(( ( $(date -ud ${EXDATE} +'%s') - $(date -ud `date +%Y-%m-%d` +'%s') )/60/60/24 ))
else
echo "UNKNOWN - "$DTYPE" unsupported"
exit 3
Expand Down

0 comments on commit 1c31ed7

Please sign in to comment.