bind_remove_domain_on_slave.sh: fix error removing domain in case of silent running: set 'ZONE_FILE_SLAVE_DIR'
This commit is contained in:
parent
a7f0eb5c23
commit
a47334975c
@ -170,8 +170,8 @@ trap clean_up SIGHUP SIGINT SIGTERM
|
|||||||
#---------------------------------------
|
#---------------------------------------
|
||||||
|
|
||||||
if [[ -t 1 ]] ; then
|
if [[ -t 1 ]] ; then
|
||||||
terminal=true
|
terminal=true
|
||||||
LOGGING=true
|
LOGGING=true
|
||||||
else
|
else
|
||||||
terminal=false
|
terminal=false
|
||||||
LOGGING=false
|
LOGGING=false
|
||||||
@ -402,7 +402,7 @@ else # if $LOGGING
|
|||||||
|
|
||||||
[[ -n "$ZONES_DECLARATION_FILE" ]] || ZONES_DECLARATION_FILE="${CONF_FILE_DIR}/named.conf.local"
|
[[ -n "$ZONES_DECLARATION_FILE" ]] || ZONES_DECLARATION_FILE="${CONF_FILE_DIR}/named.conf.local"
|
||||||
[[ -n "$ZONE_FILE_MASTER_DIR" ]] || ZONE_FILE_MASTER_DIR="${CONF_FILE_DIR}/master"
|
[[ -n "$ZONE_FILE_MASTER_DIR" ]] || ZONE_FILE_MASTER_DIR="${CONF_FILE_DIR}/master"
|
||||||
[[ -n "$ZONE_FILE_SLAVE_DIR" ]] || ZONE_FILE_SLAVE_DIR="$DEFAULT_ZONE_FILE_SLAVE_DIR"
|
[[ -n "$ZONE_FILE_SLAVE_DIR" ]] || ZONE_FILE_SLAVE_DIR="${DEFAULT_BIND_CACHE_DIR}"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ if [[ ! -f "$ZONES_DECLARATION_FILE" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "$ZONE_FILE_SLAVE_DIR" ]]; then
|
if [[ ! -d "$ZONE_FILE_SLAVE_DIR" ]]; then
|
||||||
fatal "Zone File Directory (slave zones) not found!"
|
fatal "Zone File Directory '${ZONE_FILE_SLAVE_DIR}' (slave zones) not found!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q -E "^\s*zone\s+\"?${DOMAIN_REQUESTED_TO_REMOVE}\"?\s+\{" $ZONES_DECLARATION_FILE 2> /dev/null ; then
|
if ! grep -q -E "^\s*zone\s+\"?${DOMAIN_REQUESTED_TO_REMOVE}\"?\s+\{" $ZONES_DECLARATION_FILE 2> /dev/null ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user