mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 13:54:26 -07:00
Fix SERIAL sync in DNS cluster
This commit is contained in:
parent
7b0824015f
commit
bdc8111b06
14 changed files with 298 additions and 670 deletions
|
@ -32,25 +32,13 @@ is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
|
|||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
eval $(grep $host $VESTA/conf/dns-cluster.conf)
|
||||
case $TYPE in
|
||||
ssh) send_cmd="send_ssh_cmd" ;;
|
||||
*) send_cmd="send_api_cmd" ;;
|
||||
esac
|
||||
|
||||
|
||||
# Check host connection
|
||||
$send_cmd v-list-sys-config
|
||||
if [ $? -eq 0 ]; then
|
||||
# Deleting domains
|
||||
$BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
|
||||
$send_cmd v-add-cron-restart-job
|
||||
fi
|
||||
# Deleting remote domains
|
||||
$BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
|
||||
|
||||
# Deleting server
|
||||
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
|
||||
|
||||
# Delete DNS_CLUSTER key
|
||||
# Deleting DNS_CLUSTER key
|
||||
check_cluster=$(grep HOST $VESTA/conf/dns-cluster.conf |wc -l)
|
||||
if [ "$check_cluster" -eq '0' ]; then
|
||||
rm -f $VESTA/conf/dns-cluster.conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue