[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
This commit is contained in:
frju365 2018-12-02 17:20:03 +01:00 committed by Alexandre Aubin
parent 640bc494cb
commit 48e20ca9bf

View file

@ -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")