From: Lukas Schauer Date: Fri, 8 Jan 2016 18:48:02 +0000 (+0100) Subject: use _exiterr helper in a few more places X-Git-Tag: v0.1.0~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f06f764f38e8cd378828dd8b311fad5cfec444c8;p=thirdparty%2Fdehydrated.git use _exiterr helper in a few more places --- 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