mirror of
https://github.com/myvesta/vesta.git
synced 2024-12-21 11:31:21 -08:00
47 lines
1.3 KiB
Bash
Executable File
47 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# info: unsuspend remote dns server
|
|
# options: HOST
|
|
#
|
|
# The function for unsuspending remote dns server.
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Variable&Function #
|
|
#----------------------------------------------------------#
|
|
|
|
# Argument definition
|
|
host=$1
|
|
|
|
# Includes
|
|
source $VESTA/func/main.sh
|
|
source $VESTA/conf/vesta.conf
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Verifications #
|
|
#----------------------------------------------------------#
|
|
|
|
check_args '1' "$#" 'HOST'
|
|
is_format_valid 'host'
|
|
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
|
|
is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
|
|
is_object_suspended "../../conf/dns-cluster" 'HOST' "$host"
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Action #
|
|
#----------------------------------------------------------#
|
|
|
|
# Unsuspend remote dns server
|
|
update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'no'
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
# Vesta #
|
|
#----------------------------------------------------------#
|
|
|
|
# Logging
|
|
log_event "$OK" "$ARGUMENTS"
|
|
|
|
exit
|