Skip to content

Commit 61b32cc

Browse files
author
Ice Lake
authored
fix: nameserver A record validation
1 parent 2609b6a commit 61b32cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/domain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ is_dns_nameserver_valid() {
622622
remote=$(echo $r |grep ".$domain.$")
623623
if [ -n "$remote" ]; then
624624
zone=$USER_DATA/dns/$d.conf
625-
a_record=$(echo $r |cut -f 1 -d '.')
625+
a_record=${r%.$d.}
626626
n_record=$(grep "RECORD='$a_record'" $zone| grep "TYPE='A'")
627627
if [ -z "$n_record" ]; then
628628
check_result "$E_NOTEXIST" "IN A $a_record.$d does not exist"

0 commit comments

Comments
 (0)