@@ -30,10 +30,6 @@ ConfigDictTemplate = [
|
||||
{
|
||||
"name": "certificate",
|
||||
"values": [
|
||||
{
|
||||
"option": "generate",
|
||||
"default": "true",
|
||||
},
|
||||
{
|
||||
"option": "type",
|
||||
"default": "self-signed",
|
||||
|
||||
@@ -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")),
|
||||
|
||||
@@ -162,10 +162,6 @@ fi
|
||||
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":
|
||||
|
||||
4
run.py
4
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 ! "
|
||||
|
||||
Reference in New Issue
Block a user