Skip to content

Commit b370cbf

Browse files
authored
Merge pull request hestiacp#1065 from Skamasle/patch-12
Remove trailing dot
2 parents b87246d + 50f08b7 commit b370cbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bin/v-add-dns-record

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,16 @@ if [ ! -z "$DNS_CLUSTER" ]; then
109109
fi
110110
fi
111111

112+
# remove trailing dot at the end of NS/CNAME/MX/PTR/SRV record
113+
114+
if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
115+
trailing_dot2=$(echo $record | grep "\.$")
116+
if [ ! -z $trailing_dot2 ]; then
117+
record=$(echo "${record::-1}")
118+
fi
119+
fi
120+
121+
112122

113123
#----------------------------------------------------------#
114124
# Vesta #

0 commit comments

Comments
 (0)