Skip to content

Commit

Permalink
Merge pull request #35 from krzys-h/add-io
Browse files Browse the repository at this point in the history
Add .io domain support
  • Loading branch information
ewypych authored May 17, 2021
2 parents 65f46f0 + 9759a6c commit 79a2e9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Supported Top-level Domains
* ie
* id
* dev
* io

Supported Whois Servers

Expand Down
9 changes: 9 additions & 0 deletions check_domain_expiration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ check_domain()
else
EXP_DAYS=$(( ( $(date -ud ${EXDATE} +'%s') - $(date -ud `date +%Y-%m-%d` +'%s') )/60/60/24 ))
fi
elif [ "$DTYPE" == "io" ]
then
EXDATE=$(${WHOIS} -h whois.nic.io "${1}" | ${AWK} '/Registry Expiry Date:/ { gsub("[:.]","-"); print $4 }' | cut -d 'T' -f1)
if [ -z "$EXDATE" ]
then
EXP_DAYS=NULL
else
EXP_DAYS=$(( ( $(date -ud ${EXDATE} +'%s') - $(date -ud `date +%Y-%m-%d` +'%s') )/60/60/24 ))
fi
else
echo "UNKNOWN - "$DTYPE" unsupported"
exit 3
Expand Down

0 comments on commit 79a2e9d

Please sign in to comment.