make certdir a parameter to sign_domain

This commit is contained in:
typingArtist
2017-10-08 10:24:22 +02:00
committed by Lukas Schauer
parent 3ec54e7e0f
commit eb1c4ac41d

View File

@@ -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