You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							52 lines
						
					
					
						
							1.6 KiB
						
					
					
				
			
		
		
	
	
							52 lines
						
					
					
						
							1.6 KiB
						
					
					
				#!/bin/bash
 | 
						|
# info: unsuspend remote dns server
 | 
						|
# options: HOST
 | 
						|
#
 | 
						|
# example: v-unsuspend-remote-dns-host hosname.com
 | 
						|
#
 | 
						|
# This function for unsuspending remote dns server.
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                Variables & Functions                     #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Argument definition
 | 
						|
host=$1
 | 
						|
 | 
						|
# Includes
 | 
						|
# shellcheck source=/etc/hestiacp/hestia.conf
 | 
						|
source /etc/hestiacp/hestia.conf
 | 
						|
# shellcheck source=/usr/local/hestia/func/main.sh
 | 
						|
source $HESTIA/func/main.sh
 | 
						|
# load config file
 | 
						|
source_conf "$HESTIA/conf/hestia.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"
 | 
						|
 | 
						|
# Perform verification if read-only mode is enabled
 | 
						|
check_hestia_demo_mode
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                       Action                             #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Unsuspend remote dns server
 | 
						|
update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'no'
 | 
						|
 | 
						|
#----------------------------------------------------------#
 | 
						|
#                       Hestia                             #
 | 
						|
#----------------------------------------------------------#
 | 
						|
 | 
						|
# Logging
 | 
						|
log_event "$OK" "$ARGUMENTS"
 | 
						|
 | 
						|
exit
 |