Skip to content

Commit

Permalink
Merge pull request #38 from danoost/master
Browse files Browse the repository at this point in the history
Add support for .fm and .xyz
  • Loading branch information
ewypych authored Nov 7, 2021
2 parents 4cc0791 + 31e7bf4 commit ee2a4a7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Supported Top-level Domains
* space
* us
* in
* fm
* xyz

Supported Whois Servers

Expand Down
20 changes: 20 additions & 0 deletions check_domain_expiration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,26 @@ check_domain()
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
elif [ "$DTYPE" == "fm" ]
then
EXDATE_TMP=$(${WHOIS} -h whois.nic.fm "${1}" | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -c 1-16)
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
elif [ "$DTYPE" == "xyz" ]
then
EXDATE_TMP=$(${WHOIS} -h whois.nic.xyz "${1}" | ${AWK} '/Registry Expiry Date:/ { print $4 }' | cut -c 1-16)
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 ee2a4a7

Please sign in to comment.