From 62037de04169ca36c49c581c37d0cffbce86e401 Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Mon, 14 Dec 2015 01:37:03 +0100 Subject: [PATCH] use config vars from letsencrypt.sh in import-script --- import-certs.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/import-certs.sh b/import-certs.sh index d80d3f5..eb13064 100755 --- a/import-certs.sh +++ b/import-certs.sh @@ -10,8 +10,12 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BASEDIR="${SCRIPTDIR}" LETSENCRYPT="/etc/letsencrypt" -# shellcheck disable=SC1090 -. "${SCRIPTDIR}/config.sh" +eval "$("${SCRIPTDIR}/letsencrypt.sh" --env)" + +if [[ ! -e "${LETSENCRYPT}" ]]; then + echo "No existing letsencrypt files found." + exit 1 +fi if [[ -e "${BASEDIR}/domains.txt" ]]; then DOMAINS_TXT="${BASEDIR}/domains.txt"