Fix backup

This commit is contained in:
MadeITBelgium 2017-09-23 15:09:27 +00:00
commit 37a2525ab0
2 changed files with 85 additions and 26 deletions

View file

@ -492,13 +492,16 @@ if [ "$dns" != 'no' ] && [ ! -z "$DNS_SYSTEM" ]; then
old_ip=$IP
IP=$ip
fi
# Checking ipv6 address
check_ipv6=$(is_ipv6_valid $IP6 $user)
if [ ! -z "$check_ipv6" ]; then
local_ip6=''
get_user_ipv6 $user
old_ipv6=$IP6
IP=$ipv6
IP6=$ipv6
else
old_ipv6=''
fi
# Checking dns template
@ -516,6 +519,14 @@ if [ "$dns" != 'no' ] && [ ! -z "$DNS_SYSTEM" ]; then
# Restoring dns records
cp -f $tmpdir/dns/$domain/vesta/$domain.conf $USER_DATA/dns/
if [ -z "$old_ipv6" ] && [ ! -z "$IP6" ]; then
time_n_date=$(date +'%T %F')
time=$(echo "$time_n_date" |cut -f 1 -d \ )
date=$(echo "$time_n_date" |cut -f 2 -d \ )
ip=""
ipv6="$IP6"
add_dns_config_records
fi
# Rebuilding dns domain
rebuild_dns_domain_conf