]> git.street.me.uk Git - andy/dehydrated.git/commitdiff
Pass intermediate cert to hook script
authoro1oo11oo <o1oo11oo@users.noreply.github.com>
Wed, 17 Feb 2016 21:25:44 +0000 (22:25 +0100)
committero1oo11oo <o1oo11oo@users.noreply.github.com>
Wed, 17 Feb 2016 21:25:44 +0000 (22:25 +0100)
hook.sh.example
letsencrypt.sh

index 6aee5f19faeb31a6a087e75f01f6d3b795aba030..41d32a092028ed4adab1ed60b34e150b9758cd03 100644 (file)
@@ -32,7 +32,7 @@ function clean_challenge {
 }
 
 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
     # 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.
     # - CERTFILE
     #   The path of the file containing the signed certificate.
-    # - CHAINFILE
+    # - FULLCHAINFILE
     #   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 $@
index 9821d2a5ecf2266681bd3ee199a391cda630de05..ecf00ba126e4143c825d78b8857655aae2f4c965 100755 (executable)
@@ -533,7 +533,7 @@ sign_domain() {
   ln -sf "cert-${timestamp}.pem" "${BASEDIR}/certs/${domain}/cert.pem"
 
   # 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
   echo " + Done!"