Skip to content

Commit 7e4e973

Browse files
author
Kristan Kenney
committed
Fix DNS restore/sync process
* Replace DNS records with new IP when changed * Add missing user to DNS restore * Sync domains on restore with remote cluster
1 parent c04becd commit 7e4e973

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bin/v-restore-user

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,19 @@ if [ "$dns" != 'no' ] && [ ! -z "$DNS_SYSTEM" ]; then
504504
# Restoring DNS records
505505
cp -f $tmpdir/dns/$domain/$backup_system/$domain.conf $USER_DATA/dns/
506506

507+
# Update IP in records
508+
if [ ! -z "$old_ip" ]; then
509+
sed -i s/$old_ip/$IP/g $USER_DATA/dns/$domain.conf
510+
fi
511+
507512
# Rebuilding DNS domain
508513
rebuild_dns_domain_conf
514+
515+
# Updating dns-cluster queue
516+
if [ ! -z "$DNS_CLUSTER" ]; then
517+
cmd="$BIN/v-add-remote-dns-domain $user $domain yes"
518+
echo "$cmd" >> $HESTIA/data/queue/dns-cluster.pipe
519+
fi
509520
done
510521

511522
# Restarting DNS

0 commit comments

Comments
 (0)