From f06f764f38e8cd378828dd8b311fad5cfec444c8 Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Fri, 8 Jan 2016 19:48:02 +0100 Subject: [PATCH] use _exiterr helper in a few more places --- letsencrypt.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/letsencrypt.sh b/letsencrypt.sh index fe0098c..751c5e3 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -52,18 +52,14 @@ load_config() { # shellcheck disable=SC1090 . "${CONFIG}" else - echo "Specified config file doesn't exist." >&2 - exit 1 + _exiterr "Specified config file doesn't exist." fi # Remove slash from end of BASEDIR. Mostly for cleaner outputs, doesn't change functionality. BASEDIR="${BASEDIR%%/}" # Check BASEDIR and set default variables - if [[ ! -d "${BASEDIR}" ]]; then - echo "BASEDIR does not exist: ${BASEDIR}" >&2 - exit 1 - fi + [[ -d "${BASEDIR}" ]] || _exiterr "BASEDIR does not exist: ${BASEDIR}" } # Initialize system -- 2.47.2