From a5f061a8b259ff4fabff494d477e9e3dab65adcc Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Sun, 13 Nov 2016 18:37:09 +0100 Subject: [PATCH] Fix a typo when renaming the domain variable --- admin/mailu/certbot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/mailu/certbot.py b/admin/mailu/certbot.py index 9902e5df..7b476a19 100644 --- a/admin/mailu/certbot.py +++ b/admin/mailu/certbot.py @@ -45,6 +45,7 @@ def certbot_install(domain): @scheduler.scheduled_job('cron', hour=2, minute=0) def generate_cert(): print("Generating TLS certificates using Certbot") + hostname = app.config["HOSTNAME"] email = "{}@{}".format(app.config["POSTMASTER"], app.config["DOMAIN"]) result = certbot_command( "certonly", @@ -52,7 +53,7 @@ def generate_cert(): "--agree-tos", "--preferred-challenges", "http", "--email", email, - "-d", app.config["HOSTNAME"], + "-d", hostname, # The port is hardcoded in the nginx image as well, we should find # a more suitable way to go but this will do until we have a proper # daemon handling certbot stuff @@ -63,6 +64,6 @@ def generate_cert(): result.stdout.decode("utf8") + result.stdout.decode("utf8"))) else: print("Successfully generated or renewed TLS certificates") - if certbot_install(domain): + if certbot_install(hostname): print("Reloading TLS-dependant services") dockercli.reload("http", "smtp", "imap")