@@ -30,10 +30,6 @@ ConfigDictTemplate = [
|
|||||||
{
|
{
|
||||||
"name": "certificate",
|
"name": "certificate",
|
||||||
"values": [
|
"values": [
|
||||||
{
|
|
||||||
"option": "generate",
|
|
||||||
"default": "true",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"option": "type",
|
"option": "type",
|
||||||
"default": "self-signed",
|
"default": "self-signed",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Nginx(base.Installer):
|
|||||||
|
|
||||||
def get_template_context(self, app):
|
def get_template_context(self, app):
|
||||||
"""Additionnal variables."""
|
"""Additionnal variables."""
|
||||||
context = super(Nginx, self).get_template_context()
|
context = super().get_template_context()
|
||||||
context.update({
|
context.update({
|
||||||
"app_instance_path": (
|
"app_instance_path": (
|
||||||
self.config.get(app, "instance_path")),
|
self.config.get(app, "instance_path")),
|
||||||
|
|||||||
@@ -162,10 +162,6 @@ fi
|
|||||||
def get_backend(config):
|
def get_backend(config):
|
||||||
"""Return the appropriate backend."""
|
"""Return the appropriate backend."""
|
||||||
cert_type = config.get("certificate", "type")
|
cert_type = config.get("certificate", "type")
|
||||||
condition = (not config.getboolean("certificate", "generate") and
|
|
||||||
cert_type != "manual")
|
|
||||||
if condition:
|
|
||||||
return None
|
|
||||||
if cert_type == "letsencrypt":
|
if cert_type == "letsencrypt":
|
||||||
return LetsEncryptCertificate(config)
|
return LetsEncryptCertificate(config)
|
||||||
if cert_type == "manual":
|
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:
|
if is_config_file_available and outdate_config:
|
||||||
answer = utils.user_input("It seems that your config file is outdated. "
|
answer = utils.user_input("It seems that your config file is outdated. "
|
||||||
"Would you like to update it? (Y/n) ")
|
"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))
|
config_file_update_complete(utils.update_config(args.configfile))
|
||||||
if not args.stop_after_configfile_check:
|
if not args.stop_after_configfile_check:
|
||||||
answer = utils.user_input("Would you like to stop to review the updated config? (Y/n)")
|
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
|
return
|
||||||
else:
|
else:
|
||||||
utils.error("You might encounter unexpected errors ! "
|
utils.error("You might encounter unexpected errors ! "
|
||||||
|
|||||||
Reference in New Issue
Block a user