From 8871b614e726b44e209a49a32434e635fca77aa7 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 2 Aug 2018 12:16:05 +0200 Subject: [PATCH] bind_remove_domain_on_slave.sh: Load default configuration if configuration file not found. --- bind_remove_domain_on_slave.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bind_remove_domain_on_slave.sh b/bind_remove_domain_on_slave.sh index 97aaa90..e3179c0 100755 --- a/bind_remove_domain_on_slave.sh +++ b/bind_remove_domain_on_slave.sh @@ -377,9 +377,10 @@ if $LOGGING ; then else # if $LOGGING - if [[ ! -f "$conf_file" ]]; then - fatal "Configuration file '$conf_file' not found!" - else + #if [[ ! -f "$conf_file" ]]; then + # fatal "Configuration file '$conf_file' not found!" + #else + if [[ -f "$conf_file" ]]; then echononl " Loading default Configuration values from $(basename ${conf_file}).." source "${conf_file}" > $log_file 2>&1 if [[ $? -eq 0 ]]; then @@ -390,6 +391,8 @@ else # if $LOGGING fi fi + [[ -z "$CONF_FILE_DIR" ]] && CONF_FILE_DIR="$DEFAULT_CONF_FILE_DIR" + if [[ -z "$CONF_FILE_DIR" ]]; then fatal "Directory contaning bind configurations not set (see CONF_FILE_DIR)!" fi