Skip to content

Commit

Permalink
Merge pull request #28 from tkoeck/master
Browse files Browse the repository at this point in the history
Added support for .do domains
  • Loading branch information
ewypych authored Oct 18, 2020
2 parents 4290ad7 + 4eac15f commit 6ddf5b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion check_domain_expiration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,16 @@ check_domain()
EXP_DAYS=$(( ( $(date -ud ${EXDATE} +'%s') - $(date -ud `date +%Y-%m-%d` +'%s') )/60/60/24 ))
fi


elif [ "$DTYPE" == "do" ]
then
EXDATE_TMP=$(${WHOIS} -h whois.nic.do "${1}" | ${AWK} '/Registrar Registration Expiration Date:/ { print $5 }')
if [ -z "$EXDATE_TMP" ]
then
EXP_DAYS=NULL
else
EXDATE=`date -d"$EXDATE_TMP" +%Y-%m-%d`
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 6ddf5b3

Please sign in to comment.