Browse Source

Fix v-add-dns-record when adding TLSA records

Hestia encloses value of TLSA records with double quotes and Bind doesn't allow it, giving a SERVFAIL when trying to query any type of record of that zone.
sahsanu 1 year ago
parent
commit
fed8088b9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      bin/v-add-dns-record

+ 1 - 1
bin/v-add-dns-record

@@ -71,7 +71,7 @@ fi
 if [ "$rtype" != "CAA" ]; then
 if [ "$rtype" != "CAA" ]; then
 	dvalue=${dvalue//\"/}
 	dvalue=${dvalue//\"/}
 	# Add support for DS key
 	# Add support for DS key
-	if [ "$rtype" != "DNSKEY" ] && [ "$rtype" != "DS" ]; then
+	if [ "$rtype" != "DNSKEY" ] && [ "$rtype" != "DS" ] && [ "$rtype" != "TLSA" ]; then
 		if [ "$rtype" != 'SRV' ] && [[ "$dvalue" =~ [\;[:space:]] ]]; then
 		if [ "$rtype" != 'SRV' ] && [[ "$dvalue" =~ [\;[:space:]] ]]; then
 			dvalue='"'"$dvalue"'"'
 			dvalue='"'"$dvalue"'"'
 		fi
 		fi