mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
remote dns host verification
This commit is contained in:
parent
c39f021551
commit
d108cdfc91
2 changed files with 11 additions and 7 deletions
|
@ -49,7 +49,7 @@ old_ifs="$IFS"
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
# Starting cluster loop
|
# Starting cluster loop
|
||||||
for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
|
for cluster_str in $(grep SUSPENDED='no' $VESTA/conf/dns-cluster.conf); do
|
||||||
|
|
||||||
# Get host values
|
# Get host values
|
||||||
eval $cluster_str
|
eval $cluster_str
|
||||||
|
|
|
@ -32,16 +32,20 @@ is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Deleting domains
|
|
||||||
$BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
|
|
||||||
|
|
||||||
# Disabling restart queue
|
|
||||||
eval $(grep $host $VESTA/conf/dns-cluster.conf)
|
eval $(grep $host $VESTA/conf/dns-cluster.conf)
|
||||||
case $TYPE in
|
case $TYPE in
|
||||||
ssh) send_cmd="send_ssh_cmd" ;;
|
ssh) send_cmd="send_ssh_cmd" ;;
|
||||||
*) send_cmd="send_api_cmd" ;;
|
*) send_cmd="send_api_cmd" ;;
|
||||||
esac
|
esac
|
||||||
$send_cmd v-add-cron-restart-job
|
|
||||||
|
|
||||||
|
# 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 server
|
# Deleting server
|
||||||
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
|
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
|
||||||
|
@ -67,7 +71,7 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "deleted $type database server $host" '' 'admin'
|
log_history "deleted remote dns server $host" '' 'admin'
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue