diff --git a/modoboa_installer/config_dict_template.py b/modoboa_installer/config_dict_template.py index bb7325d6..32af0e55 100644 --- a/modoboa_installer/config_dict_template.py +++ b/modoboa_installer/config_dict_template.py @@ -30,10 +30,6 @@ def is_email(user_input): { "name": "certificate", "values": [ - { - "option": "generate", - "default": "true", - }, { "option": "type", "default": "self-signed", diff --git a/modoboa_installer/scripts/nginx.py b/modoboa_installer/scripts/nginx.py index 35378426..3847b14f 100644 --- a/modoboa_installer/scripts/nginx.py +++ b/modoboa_installer/scripts/nginx.py @@ -21,7 +21,7 @@ class Nginx(base.Installer): def get_template_context(self, app): """Additionnal variables.""" - context = super(Nginx, self).get_template_context() + context = super().get_template_context() context.update({ "app_instance_path": ( self.config.get(app, "instance_path")), diff --git a/modoboa_installer/ssl.py b/modoboa_installer/ssl.py index 87299c72..d85130f6 100644 --- a/modoboa_installer/ssl.py +++ b/modoboa_installer/ssl.py @@ -162,10 +162,6 @@ def generate_cert(self): def get_backend(config): """Return the appropriate backend.""" cert_type = config.get("certificate", "type") - condition = (not config.getboolean("certificate", "generate") and - cert_type != "manual") - if condition: - return None if cert_type == "letsencrypt": return LetsEncryptCertificate(config) if cert_type == "manual": diff --git a/run.py b/run.py index 15fb9bf5..22cfa145 100755 --- a/run.py +++ b/run.py @@ -223,11 +223,11 @@ def main(input_args): if is_config_file_available and outdate_config: answer = utils.user_input("It seems that your config file is outdated. " "Would you like to update it? (Y/n) ") - if answer.lower().startswith("y"): + if not answer or answer.lower().startswith("y"): config_file_update_complete(utils.update_config(args.configfile)) if not args.stop_after_configfile_check: answer = utils.user_input("Would you like to stop to review the updated config? (Y/n)") - if answer.lower().startswith("y"): + if not answer or answer.lower().startswith("y"): return else: utils.error("You might encounter unexpected errors ! "