2013-10-21 16:21:43 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# info: suspend remote dns server
|
|
|
|
# options: HOST
|
|
|
|
#
|
|
|
|
# The function for suspending remote dns server.
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Variable&Function #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
2015-11-06 17:38:58 +02:00
|
|
|
# Argument definition
|
2013-10-21 16:21:43 +03:00
|
|
|
host=$1
|
|
|
|
|
|
|
|
# Includes
|
|
|
|
source $VESTA/func/main.sh
|
|
|
|
source $VESTA/conf/vesta.conf
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Verifications #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
check_args '1' "$#" 'HOST'
|
2016-06-09 16:31:56 +03:00
|
|
|
is_format_valid 'host'
|
2013-10-21 16:21:43 +03:00
|
|
|
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
|
|
|
|
is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
|
|
|
|
is_object_unsuspended "../../conf/dns-cluster" 'HOST' "$host"
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Action #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
# Unsuspend remote dns server
|
|
|
|
update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'yes'
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Vesta #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
# Logging
|
2016-06-09 16:31:56 +03:00
|
|
|
log_event "$OK" "$ARGUMENTS"
|
2013-10-21 16:21:43 +03:00
|
|
|
|
|
|
|
exit
|