From 48e20ca9bf4d40cc683ab654035bf9a5f01b4804 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sun, 2 Dec 2018 17:20:03 +0100 Subject: [PATCH] [fix] Regen nginx conf to be sure it integrates OCSP Stapling (#588) * [fix] Regen nginx conf to be sure it integrates OCSP Stapling * Typo * Regen nginx each time we enable a new cert * add comment about the reason of the PR --- src/yunohost/certificate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yunohost/certificate.py b/src/yunohost/certificate.py index 801741b31..8da6ab52a 100644 --- a/src/yunohost/certificate.py +++ b/src/yunohost/certificate.py @@ -803,6 +803,11 @@ def _enable_certificate(domain, new_cert_folder): for service in ("postfix", "dovecot", "metronome"): _run_service_command("restart", service) + if os.path.isfile('/etc/yunohost/installed'): + # regen nginx conf to be sure it integrates OCSP Stapling + # (We don't do this yet if postinstall is not finished yet) + service_regen_conf(names=['nginx']) + _run_service_command("reload", "nginx")