Commit d1b20b35 authored by Lukas Schauer's avatar Lukas Schauer

Merge pull request #98 from ymc/fix/configuring_BASEDIR_does_not_affect_built_in_defaults

Respect configured BASEDIR for default values
parents 23b0ef5a 9baf3532
......@@ -49,14 +49,14 @@ load_config() {
CHALLENGETYPE="http-01"
HOOK=
RENEW_DAYS="30"
PRIVATE_KEY="${BASEDIR}/private_key.pem"
PRIVATE_KEY=
KEYSIZE="4096"
WELLKNOWN="${BASEDIR}/.acme-challenges"
WELLKNOWN=
PRIVATE_KEY_RENEW="no"
KEY_ALGO=rsa
OPENSSL_CNF="$(openssl version -d | cut -d'"' -f2)/openssl.cnf"
CONTACT_EMAIL=
LOCKFILE="${BASEDIR}/lock"
LOCKFILE=
if [[ -z "${CONFIG:-}" ]]; then
echo "#" >&2
......@@ -77,6 +77,10 @@ load_config() {
# Check BASEDIR and set default variables
[[ -d "${BASEDIR}" ]] || _exiterr "BASEDIR does not exist: ${BASEDIR}"
[[ -z "${PRIVATE_KEY}" ]] && PRIVATE_KEY="${BASEDIR}/private_key.pem"
[[ -z "${WELLKNOWN}" ]] && WELLKNOWN="${BASEDIR}/.acme-challenges"
[[ -z "${LOCKFILE}" ]] && LOCKFILE="${BASEDIR}/lock"
[[ -n "${PARAM_HOOK:-}" ]] && HOOK="${PARAM_HOOK}"
[[ -n "${PARAM_CHALLENGETYPE:-}" ]] && CHALLENGETYPE="${PARAM_CHALLENGETYPE}"
[[ -n "${PARAM_KEY_ALGO:-}" ]] && KEY_ALGO="${PARAM_KEY_ALGO}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment