Skip to content

Commit

Permalink
Fixed support for .sg TLD.
Browse files Browse the repository at this point in the history
Typo corrected.

Signed-off-by: vlad11 <admin@support.od.ua>
  • Loading branch information
click0 committed Apr 7, 2024
1 parent b876597 commit 8654fdf
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions domain-check-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
# Author: Matty < matty91 at gmail dot com >
# Co-author: Vladislav V. Prodan <github.com/click0>
#
# Current Version: 2.69
# Last Updated: 19-Mar-2024
# Current Version: 2.70
# Last Updated: 07-Apr-2024
#
# Revision History:
#
# Version 2.70
# Fixed support for .sg domain -- Vladyslav V. Prodan <github.com/click0>
#
# Version 2.69
# Fixed support for .sk/.bm TLDs. -- Vladyslav V. Prodan <github.com/click0>
#
Expand Down Expand Up @@ -772,7 +775,7 @@ check_domain_status()
"${TLDTYPE}" == "team" -o "${TLDTYPE}" == "info" -o "${TLDTYPE}" == "xxx" -o "${TLDTYPE}" == "md" -o \
"${TLDTYPE}" == "se" -o "${TLDTYPE}" == "nu" -o "${TLDTYPE}" == "dk" -o "${TLDTYPE}" == "it" -o \
"${TLDTYPE}" == "do" -o "${TLDTYPE}" == "ro" -o "${TLDTYPE}" == "game" -o "${TLDTYPE}" == "pk" -o \
"${TLDTYPE}" == "ee" -o "${TLDTYPE}" == "st" ];
"${TLDTYPE}" == "ee" -o "${TLDTYPE}" == "st" -o "${TLDTYPE}" == "sg" ];
then
# From date format 2023-12-11 convert to ${tday}-${tmonth}-${tyear} (11-dec-2023)
tdomdate=`${AWK} '/Registrar Registration Expiration [Dd]ate:|Registry Expiry Date:|Expiration [Dd]ate:|\
Expand Down Expand Up @@ -1055,14 +1058,6 @@ check_domain_status()
tday=$(echo $tdomdate| ${CUT} -c-2)
DOMAINDATE=`echo $tday-$tmonth-$tyear`

elif [ "${TLDTYPE}" == "sg" ]; # for .sg added @copenhaus 2021/03/02
then
tdomdate=`${AWK} '/Expiration Date:/ { print $3 }' ${WHOIS_TMP} | ${TR} -d " \r"`
tyear=$(echo $tdomdate| ${CUT} -c8-11)
tmonth=$(echo $tdomdate| ${CUT} -c4-6)
tday=$(echo $tdomdate| ${CUT} -c-2)
DOMAINDATE=`echo $tday-$tmonth-$tyear`

elif [ "${TLDTYPE}" == "ar" ] && [ "${SUBTLDTYPE}" != "com.ar" ] # for .ar added @axelvf 2022/07/21
then
tdomdate=`${AWK} '/expire:/ { print $2 }' ${WHOIS_TMP} | ${TR} -d " \r"`
Expand All @@ -1072,7 +1067,7 @@ check_domain_status()
tday=`echo ${tdomdate} | ${CUT} -d'.' -f3`
DOMAINDATE=`echo "${tday}-${tmonth}-${tyear}"`

elif [ "${TLDTYPE}" == "cf" ]; # for .sg added @click0 2021/07/24
elif [ "${TLDTYPE}" == "cf" ]; # for .cf added @click0 2021/07/24
then
tdomdate=`${AWK} -F: '/Record will expire on:/ { print $2 }' ${WHOIS_TMP} | ${TR} -d " \r"`
tyear=$(echo ${tdomdate} | ${CUT} -d'/' -f3)
Expand Down

0 comments on commit 8654fdf

Please sign in to comment.