mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-05-17 04:17:00 +02:00
Merge pull request #144 from o1oo11oo/pass_chainfile_to_hook
Pass intermediate cert to hook script
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
private_key.pem
|
private_key.pem
|
||||||
domains.txt
|
domains.txt
|
||||||
config.sh
|
config.sh
|
||||||
|
hook.sh
|
||||||
certs/*
|
certs/*
|
||||||
archive/*
|
archive/*
|
||||||
.acme-challenges/*
|
.acme-challenges/*
|
||||||
|
|||||||
+4
-2
@@ -32,7 +32,7 @@ function clean_challenge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deploy_cert {
|
function deploy_cert {
|
||||||
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" CHAINFILE="${4}"
|
local DOMAIN="${1}" KEYFILE="${2}" CERTFILE="${3}" FULLCHAINFILE="${4}" CHAINFILE="${5}"
|
||||||
|
|
||||||
# This hook is called once for each certificate that has been
|
# This hook is called once for each certificate that has been
|
||||||
# produced. Here you might, for instance, copy your new certificates
|
# produced. Here you might, for instance, copy your new certificates
|
||||||
@@ -46,8 +46,10 @@ function deploy_cert {
|
|||||||
# The path of the file containing the private key.
|
# The path of the file containing the private key.
|
||||||
# - CERTFILE
|
# - CERTFILE
|
||||||
# The path of the file containing the signed certificate.
|
# The path of the file containing the signed certificate.
|
||||||
# - CHAINFILE
|
# - FULLCHAINFILE
|
||||||
# The path of the file containing the full certificate chain.
|
# The path of the file containing the full certificate chain.
|
||||||
|
# - CHAINFILE
|
||||||
|
# The path of the file containing the intermediate certificate(s).
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLER=$1; shift; $HANDLER $@
|
HANDLER=$1; shift; $HANDLER $@
|
||||||
|
|||||||
+1
-1
@@ -533,7 +533,7 @@ sign_domain() {
|
|||||||
ln -sf "cert-${timestamp}.pem" "${BASEDIR}/certs/${domain}/cert.pem"
|
ln -sf "cert-${timestamp}.pem" "${BASEDIR}/certs/${domain}/cert.pem"
|
||||||
|
|
||||||
# Wait for hook script to clean the challenge and to deploy cert if used
|
# Wait for hook script to clean the challenge and to deploy cert if used
|
||||||
[[ -n "${HOOK}" ]] && "${HOOK}" "deploy_cert" "${domain}" "${BASEDIR}/certs/${domain}/privkey.pem" "${BASEDIR}/certs/${domain}/cert.pem" "${BASEDIR}/certs/${domain}/fullchain.pem" <&4 >&5 2>&6
|
[[ -n "${HOOK}" ]] && "${HOOK}" "deploy_cert" "${domain}" "${BASEDIR}/certs/${domain}/privkey.pem" "${BASEDIR}/certs/${domain}/cert.pem" "${BASEDIR}/certs/${domain}/fullchain.pem" "${BASEDIR}/certs/${domain}/chain.pem" <&4 >&5 2>&6
|
||||||
|
|
||||||
unset challenge_token
|
unset challenge_token
|
||||||
echo " + Done!"
|
echo " + Done!"
|
||||||
|
|||||||
Reference in New Issue
Block a user