mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Merge pull request #87 from serghey-rodin/master
Not chunking already manually chunked TXT records
This commit is contained in:
commit
9ee83ce246
1 changed files with 12 additions and 6 deletions
|
@ -416,13 +416,19 @@ update_domain_zone() {
|
||||||
if [ "$TYPE" = 'TXT' ]; then
|
if [ "$TYPE" = 'TXT' ]; then
|
||||||
txtlength=${#VALUE}
|
txtlength=${#VALUE}
|
||||||
if [ $txtlength -gt 255 ]; then
|
if [ $txtlength -gt 255 ]; then
|
||||||
if [[ ${VALUE:0:1} = '"' ]]; then
|
already_chunked=0
|
||||||
txtlength=$(( $txtlength - 2 ))
|
if [[ $VALUE == *"\" \""* ]]; then
|
||||||
VALUE=${VALUE:1:txtlength}
|
already_chunked=1
|
||||||
|
fi
|
||||||
|
if [ $already_chunked -eq 0 ]; then
|
||||||
|
if [[ ${VALUE:0:1} = '"' ]]; then
|
||||||
|
txtlength=$(( $txtlength - 2 ))
|
||||||
|
VALUE=${VALUE:1:txtlength}
|
||||||
|
fi
|
||||||
|
VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n ' "$"')
|
||||||
|
VALUE=${VALUE:1}
|
||||||
|
VALUE="($VALUE)"
|
||||||
fi
|
fi
|
||||||
VALUE=$(echo $VALUE | fold -w 255 | xargs -I '$' echo -n ' "$"')
|
|
||||||
VALUE=${VALUE:1}
|
|
||||||
VALUE="($VALUE)"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue