From: typingArtist Date: Sun, 8 Oct 2017 08:24:22 +0000 (+0200) Subject: make certdir a parameter to sign_domain X-Git-Tag: v0.5.0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb1c4ac41d4eb4d4e5265620af2d0569c2ca841b;p=thirdparty%2Fdehydrated.git make certdir a parameter to sign_domain --- diff --git a/dehydrated b/dehydrated index 3e03f73..3f57d55 100755 --- a/dehydrated +++ b/dehydrated @@ -717,6 +717,8 @@ walk_chain() { # Create certificate for domain(s) sign_domain() { + local certdir="${1}" + shift domain="${1}" altnames="${*}" timestamp="$(date +%s)" @@ -728,8 +730,6 @@ sign_domain() { _exiterr "Certificate authority doesn't allow certificate signing" fi - local certdir="${CERTDIR}/${domain}" - # If there is no existing certificate directory => make it if [[ ! -e "${certdir}" ]]; then echo " + Creating new directory ${certdir} ..." @@ -1038,10 +1038,10 @@ command_sign_domains() { if [[ ! "${skip}" = "yes" ]]; then update_ocsp="yes" if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then - sign_domain ${line} & + sign_domain "${certdir}" ${domain} ${morenames} & wait $! || true else - sign_domain ${line} + sign_domain "${certdir}" ${domain} ${morenames} fi fi