new hook: sync_cert (closes #609)

This commit is contained in:
Lukas Schauer
2019-03-03 20:22:41 +01:00
parent 1c77730373
commit e4a32acbe2
3 changed files with 31 additions and 1 deletions

View File

@@ -1054,6 +1054,9 @@ sign_domain() {
rm "${tmpcert}" "${tmpchain}"
fi
# Wait for hook script to sync the files before creating the symlinks
[[ -n "${HOOK}" ]] && "${HOOK}" "sync_cert" "${certdir}/privkey-${timestamp}.pem" "${certdir}/cert-${timestamp}.pem" "${certdir}/fullchain-${timestamp}.pem" "${certdir}/chain-${timestamp}.pem" "${certdir}/cert-${timestamp}.csr"
# Update symlinks
[[ "${privkey}" = "privkey.pem" ]] || ln -sf "privkey-${timestamp}.pem" "${certdir}/privkey.pem"