File tree Expand file tree Collapse file tree 2 files changed +92
-0
lines changed
Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: suspend remote dns server
3+ # options: HOST
4+ #
5+ # The function for suspending remote dns server.
6+
7+
8+ # ----------------------------------------------------------#
9+ # Variable&Function #
10+ # ----------------------------------------------------------#
11+
12+ # Argument defenition
13+ host=$1
14+
15+ # Includes
16+ source $VESTA /func/main.sh
17+ source $VESTA /conf/vesta.conf
18+
19+
20+ # ----------------------------------------------------------#
21+ # Verifications #
22+ # ----------------------------------------------------------#
23+
24+ check_args ' 1' " $# " ' HOST'
25+ validate_format ' host'
26+ is_system_enabled " $DNS_SYSTEM " ' DNS_SYSTEM'
27+ is_object_valid " ../../conf/dns-cluster" ' HOST' " $host "
28+ is_object_unsuspended " ../../conf/dns-cluster" ' HOST' " $host "
29+
30+
31+ # ----------------------------------------------------------#
32+ # Action #
33+ # ----------------------------------------------------------#
34+
35+ # Unsuspend remote dns server
36+ update_object_value " ../../conf/dns-cluster" ' HOST' " $host " ' $SUSPENDED' ' yes'
37+
38+
39+ # ----------------------------------------------------------#
40+ # Vesta #
41+ # ----------------------------------------------------------#
42+
43+ # Logging
44+ log_event " $OK " " $EVENT "
45+
46+ exit
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # info: unsuspend remote dns server
3+ # options: HOST
4+ #
5+ # The function for unsuspending remote dns server.
6+
7+
8+ # ----------------------------------------------------------#
9+ # Variable&Function #
10+ # ----------------------------------------------------------#
11+
12+ # Argument defenition
13+ host=$1
14+
15+ # Includes
16+ source $VESTA /func/main.sh
17+ source $VESTA /conf/vesta.conf
18+
19+
20+ # ----------------------------------------------------------#
21+ # Verifications #
22+ # ----------------------------------------------------------#
23+
24+ check_args ' 1' " $# " ' HOST'
25+ validate_format ' host'
26+ is_system_enabled " $DNS_SYSTEM " ' DNS_SYSTEM'
27+ is_object_valid " ../../conf/dns-cluster" ' HOST' " $host "
28+ is_object_suspended " ../../conf/dns-cluster" ' HOST' " $host "
29+
30+
31+ # ----------------------------------------------------------#
32+ # Action #
33+ # ----------------------------------------------------------#
34+
35+ # Unsuspend remote dns server
36+ update_object_value " ../../conf/dns-cluster" ' HOST' " $host " ' $SUSPENDED' ' no'
37+
38+
39+ # ----------------------------------------------------------#
40+ # Vesta #
41+ # ----------------------------------------------------------#
42+
43+ # Logging
44+ log_event " $OK " " $EVENT "
45+
46+ exit
You can’t perform that action at this time.
0 commit comments