Not chunking already manually chunked TXT records

This commit is contained in:
dpeca 2020-08-19 14:52:45 +02:00 committed by GitHub
commit 311827c4b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -416,6 +416,11 @@ update_domain_zone() {
if [ "$TYPE" = 'TXT' ]; then
txtlength=${#VALUE}
if [ $txtlength -gt 255 ]; then
already_chunked=0
if [[ $VALUE == *"\" \""* ]]; then
already_chunked=1
fi
if [ $already_chunked -eq 0 ]; then
if [[ ${VALUE:0:1} = '"' ]]; then
txtlength=$(( $txtlength - 2 ))
VALUE=${VALUE:1:txtlength}
@ -425,6 +430,7 @@ update_domain_zone() {
VALUE="($VALUE)"
fi
fi
fi
if [ "$SUSPENDED" != 'yes' ]; then
eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $zn_conf