diff --git a/letsencrypt/hooks.py b/letsencrypt/hooks.py index 289dc0333..b7fd8b4e9 100644 --- a/letsencrypt/hooks.py +++ b/letsencrypt/hooks.py @@ -67,7 +67,7 @@ def _run_hook(shell_cmd): :returns: stderr if there was any""" - cmd = Popen(shell_cmd, shell=True, stdout=PIPE, stderr=PIPE) + cmd = Popen(shell_cmd, shell=True, stdout=PIPE, stderr=PIPE, stdin=PIPE) _out, err = cmd.communicate() if cmd.returncode != 0: logger.error('Hook command "%s" returned error code %d', shell_cmd, cmd.returncode) diff --git a/letsencrypt/renewal.py b/letsencrypt/renewal.py index 7a9b18867..b42b62caa 100644 --- a/letsencrypt/renewal.py +++ b/letsencrypt/renewal.py @@ -243,6 +243,7 @@ def renew_cert(config, domains, le_client, lineage): renewal_conf = configuration.RenewerConfiguration(config.namespace) lineage.save_successor(prior_version, new_cert, new_key.pem, new_chain, renewal_conf) lineage.update_all_links_to(lineage.latest_common_version()) + hooks.renew_hook(config, domains, lineage.live_dir) # TODO: Check return value of save_successor diff --git a/letsencrypt/storage.py b/letsencrypt/storage.py index 59daa1a0d..89f7d0f70 100644 --- a/letsencrypt/storage.py +++ b/letsencrypt/storage.py @@ -252,6 +252,7 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes self.privkey = self.configuration["privkey"] self.chain = self.configuration["chain"] self.fullchain = self.configuration["fullchain"] + self.live_dir = os.path.dirname(self.cert) self._fix_symlinks() self._check_symlinks()