File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -45,18 +45,16 @@ if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
4545 fi
4646fi
4747
48- if [ $rtype != " CAA" ]; then
49- dvalue=${dvalue// \" / }
50- # Exclude CAA records for ' enclosure
51- if [[ " $dvalue " =~ [\; [:space:]] ]]; then
52- dvalue= ' "' " $dvalue " ' "'
53- fi
54- fi
48+ # Cleanup quotes on dvalue
49+ # - [CAA] records will be left unchanged
50+ # - [SRV] will be stripped of double quotes even when containg spaces
51+ # - Rest of record types will be striped of quotes and the final string
52+ # will be enclosed in double quotes if containg spaces or semicolons
5553
56- if [[ " $dvalue " =~ [ \; [:space:]] ] ]; then
54+ if [ " $rtype " != " CAA " ]; then
5755 dvalue=${dvalue// \" / }
58- # Exclude SRV records for ' enclosure
59- if [ " $rtype " != ' SRV' ]; then
56+
57+ if [ " $rtype " != ' SRV' ] && [[ " $dvalue " =~ [ \; [:space:]] ]] ; then
6058 dvalue= ' "' " $dvalue " ' "'
6159 fi
6260fi
Original file line number Diff line number Diff line change @@ -132,10 +132,10 @@ if [ ! -z "$DNS_SYSTEM" ]; then
132132 if [ " $dns_domain " = " $domain " ]; then
133133 # Replace DNS domain CAA records with Let's Encrypt values
134134 if [ -z " $caa_record " ]; then
135- $BIN /v-add-dns-record $user $domain ' @' ' CAA' ' issue 0 "letsencrypt.org"'
135+ $BIN /v-add-dns-record $user $domain ' @' ' CAA' ' 0 issue "letsencrypt.org"'
136136 else
137137 $BIN /v-delete-dns-record $user $domain $caa_record
138- $BIN /v-add-dns-record $user $domain ' @' ' CAA' ' issue 0 "letsencrypt.org"'
138+ $BIN /v-add-dns-record $user $domain ' @' ' CAA' ' 0 issue "letsencrypt.org"'
139139 fi
140140 fi
141141fi
You can’t perform that action at this time.
0 commit comments