From 92fd269c1df2b2369fd1ce4b75bca7dc4bdec2aa Mon Sep 17 00:00:00 2001 From: Fabian Niepelt Date: Fri, 1 Sep 2017 13:44:10 +0200 Subject: [PATCH] Read domain config before doing post-hook after first issue When issuing a certificate for the first time, $Le_Domain is not available to the hooks. By reading the final domain config before doing the hooks, they will get all the variables they get when renewing. --- acme.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acme.sh b/acme.sh index cd2f981c..1f9f3a64 100755 --- a/acme.sh +++ b/acme.sh @@ -4006,6 +4006,10 @@ issue() { Le_NextRenewTime=$(_math "$Le_NextRenewTime" - 86400) _savedomainconf "Le_NextRenewTime" "$Le_NextRenewTime" + _initpath "$_main_domain" "$_ecc" + + . "$DOMAIN_CONF" + _on_issue_success "$_post_hook" "$_renew_hook" if [ "$_real_cert$_real_key$_real_ca$_reload_cmd$_real_fullchain" ]; then