From ef0f62a59bbebbbe3b0af09075d1c489dc3fe68d Mon Sep 17 00:00:00 2001 From: dpeca Date: Sun, 23 Aug 2020 19:44:12 +0200 Subject: [PATCH] Also checking "" in order to detect manually chunked record And removing brackets, since they are not necessary when whole record is in one line --- func/domain.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index ad3b8a820..6bd05b910 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -417,7 +417,7 @@ update_domain_zone() { txtlength=${#VALUE} if [ $txtlength -gt 255 ]; then already_chunked=0 - if [[ $VALUE == *"\" \""* ]]; then + if [[ $VALUE == *"\" \""* ]] || [[ $VALUE == *"\"\""* ]]; then already_chunked=1 fi if [ $already_chunked -eq 0 ]; then @@ -425,9 +425,7 @@ update_domain_zone() { txtlength=$(( $txtlength - 2 )) VALUE=${VALUE:1:txtlength} fi - VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n ' "$"') - VALUE=${VALUE:1} - VALUE="($VALUE)" + VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n '"$"') fi fi fi