mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-18 14:39:46 +02:00
make certdir a parameter to sign_domain
This commit is contained in:
committed by
Lukas Schauer
parent
3ec54e7e0f
commit
eb1c4ac41d
@@ -717,6 +717,8 @@ walk_chain() {
|
|||||||
|
|
||||||
# Create certificate for domain(s)
|
# Create certificate for domain(s)
|
||||||
sign_domain() {
|
sign_domain() {
|
||||||
|
local certdir="${1}"
|
||||||
|
shift
|
||||||
domain="${1}"
|
domain="${1}"
|
||||||
altnames="${*}"
|
altnames="${*}"
|
||||||
timestamp="$(date +%s)"
|
timestamp="$(date +%s)"
|
||||||
@@ -728,8 +730,6 @@ sign_domain() {
|
|||||||
_exiterr "Certificate authority doesn't allow certificate signing"
|
_exiterr "Certificate authority doesn't allow certificate signing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local certdir="${CERTDIR}/${domain}"
|
|
||||||
|
|
||||||
# If there is no existing certificate directory => make it
|
# If there is no existing certificate directory => make it
|
||||||
if [[ ! -e "${certdir}" ]]; then
|
if [[ ! -e "${certdir}" ]]; then
|
||||||
echo " + Creating new directory ${certdir} ..."
|
echo " + Creating new directory ${certdir} ..."
|
||||||
@@ -1038,10 +1038,10 @@ command_sign_domains() {
|
|||||||
if [[ ! "${skip}" = "yes" ]]; then
|
if [[ ! "${skip}" = "yes" ]]; then
|
||||||
update_ocsp="yes"
|
update_ocsp="yes"
|
||||||
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
if [[ "${PARAM_KEEP_GOING:-}" = "yes" ]]; then
|
||||||
sign_domain ${line} &
|
sign_domain "${certdir}" ${domain} ${morenames} &
|
||||||
wait $! || true
|
wait $! || true
|
||||||
else
|
else
|
||||||
sign_domain ${line}
|
sign_domain "${certdir}" ${domain} ${morenames}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user