forked from outroll/vesta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv-unsuspend-remote-dns-host
executable file
·46 lines (32 loc) · 1.29 KB
/
v-unsuspend-remote-dns-host
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# info: unsuspend remote dns server
# options: HOST
#
# The function for unsuspending remote dns server.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
host=$1
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
check_args '1' "$#" 'HOST'
validate_format '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" "$EVENT"
exit