mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 13:54:28 -07:00
Merge branch 'pr/86'
This commit is contained in:
commit
83104523a0
4 changed files with 28 additions and 2 deletions
|
@ -322,7 +322,7 @@ delete_pgsql_database() {
|
|||
psql_connect $HOST
|
||||
|
||||
query="REVOKE ALL PRIVILEGES ON DATABASE $database FROM $DBUSER"
|
||||
psql_qyery "$query" > /dev/null
|
||||
psql_query "$query" > /dev/null
|
||||
|
||||
query="DROP DATABASE $database"
|
||||
psql_query "$query" > /dev/null
|
||||
|
|
|
@ -412,6 +412,20 @@ update_domain_zone() {
|
|||
VALUE=$(idn --quiet -a -t "$VALUE")
|
||||
fi
|
||||
|
||||
# Split long TXT entries into 255 chunks
|
||||
if [ "$TYPE" = 'TXT' ]; then
|
||||
txtlength=${#VALUE}
|
||||
if [ $txtlength -gt 255 ]; 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
|
||||
|
||||
if [ "$SUSPENDED" != 'yes' ]; then
|
||||
eval echo -e "\"$fields\""|sed "s/%quote%/'/g" >> $zn_conf
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue