File tree Expand file tree Collapse file tree 5 files changed +31
-7
lines changed
Expand file tree Collapse file tree 5 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 1414user=$1
1515domain=$2
1616restart=$3
17- update_serial=$4
17+ update_serial=${4-no}
1818
1919# Includes
2020# shellcheck source=/etc/hestiacp/hestia.conf
Original file line number Diff line number Diff line change 1313# Argument definition
1414user=$1
1515restart=$2
16- update_serial=$3
16+ update_serial=${3-no}
1717
1818# Includes
1919# shellcheck source=/etc/hestiacp/hestia.conf
Original file line number Diff line number Diff line change @@ -54,10 +54,22 @@ check_hestia_demo_mode
5454
5555update_object_value " dns/$domain " ' ID' " $id " ' $SUSPENDED' " yes"
5656
57+ # Update serial
58+ update_domain_serial
5759# Updating zone
5860if [[ " $DNS_SYSTEM " =~ named| bind ]]; then
59- update_domain_serial
60- update_domain_zone
61+ # Do full rebuild due DNS SEC
62+ rebuild_dns_domain_conf
63+ fi
64+
65+ # Updating dns-cluster queue
66+ if [ " $DNS_CLUSTER " = " yes" ]; then
67+ # Check for first sync
68+ dlock=$( grep " domain $user $domain " $HESTIA /data/queue/dns-cluster.pipe)
69+ if [ -z " $dlock " ]; then
70+ cmd=" $BIN /v-add-remote-dns-record $user $domain $id "
71+ echo " $cmd " >> $HESTIA /data/queue/dns-cluster.pipe
72+ fi
6173fi
6274
6375# ----------------------------------------------------------#
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ for cluster in $hosts; do
107107 done
108108 if [ " $DNS_CLUSTER_SYSTEM " != " hestia-zone" ]; then
109109 # Rebuilding dns zones
110- cluster_cmd v-rebuild-dns-domains " $DNS_USER "
110+ cluster_cmd v-rebuild-dns-domains " $DNS_USER " " yes " " no "
111111 check_result $? " $TYPE connection to $HOST failed" " $E_CONNECT "
112112 fi
113113done
Original file line number Diff line number Diff line change @@ -53,10 +53,22 @@ is_object_valid "dns/$domain" 'ID' "$id"
5353
5454update_object_value " dns/$domain " ' ID' " $id " ' $SUSPENDED' " no"
5555
56+ # Update serial
57+ update_domain_serial
5658# Updating zone
5759if [[ " $DNS_SYSTEM " =~ named| bind ]]; then
58- update_domain_serial
59- update_domain_zone
60+ # Do full rebuild due DNS SEC
61+ rebuild_dns_domain_conf
62+ fi
63+
64+ # Updating dns-cluster queue
65+ if [ " $DNS_CLUSTER " = " yes" ]; then
66+ # Check for first sync
67+ dlock=$( grep " domain $user $domain " $HESTIA /data/queue/dns-cluster.pipe)
68+ if [ -z " $dlock " ]; then
69+ cmd=" $BIN /v-add-remote-dns-record $user $domain $id "
70+ echo " $cmd " >> $HESTIA /data/queue/dns-cluster.pipe
71+ fi
6072fi
6173
6274# ----------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments