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:
Christoph 2022-03-10 11:19:48 +01:00
parent a7f0eb5c23
commit a47334975c

View File

@ -170,8 +170,8 @@ trap clean_up SIGHUP SIGINT SIGTERM
#---------------------------------------
if [[ -t 1 ]] ; then
terminal=true
LOGGING=true
terminal=true
LOGGING=true
else
terminal=false
LOGGING=false
@ -402,7 +402,7 @@ else # if $LOGGING
[[ -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_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
@ -411,7 +411,7 @@ if [[ ! -f "$ZONES_DECLARATION_FILE" ]]; then
fi
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
if ! grep -q -E "^\s*zone\s+\"?${DOMAIN_REQUESTED_TO_REMOVE}\"?\s+\{" $ZONES_DECLARATION_FILE 2> /dev/null ; then