Removed pre and post hooks.
see https://github.com/modoboa/modoboa/issues/1546
This commit is contained in:
@@ -79,11 +79,7 @@ class LetsEncryptCertificate(CertificateBackend):
|
|||||||
"/etc/letsencrypt/live/{}/privkey.pem".format(hostname)))
|
"/etc/letsencrypt/live/{}/privkey.pem".format(hostname)))
|
||||||
with open("/etc/cron.d/letsencrypt", "w") as fp:
|
with open("/etc/cron.d/letsencrypt", "w") as fp:
|
||||||
fp.write("0 */12 * * * root /opt/certbot-auto renew "
|
fp.write("0 */12 * * * root /opt/certbot-auto renew "
|
||||||
"--quiet --no-self-upgrade --force-renewal "
|
"--quiet --no-self-upgrade --force-renewal\n")
|
||||||
"--pre-hook 'service nginx stop' "
|
|
||||||
"--post-hook 'service nginx start && "
|
|
||||||
"service postfix reload && "
|
|
||||||
"service dovecot reload'\n")
|
|
||||||
cfg_file = "/etc/letsencrypt/renewal/{}.conf".format(hostname)
|
cfg_file = "/etc/letsencrypt/renewal/{}.conf".format(hostname)
|
||||||
pattern = "s/authenticator = standalone/authenticator = nginx/"
|
pattern = "s/authenticator = standalone/authenticator = nginx/"
|
||||||
utils.exec_cmd("perl -pi -e '{}' {}".format(pattern, cfg_file))
|
utils.exec_cmd("perl -pi -e '{}' {}".format(pattern, cfg_file))
|
||||||
|
|||||||
Reference in New Issue
Block a user