Skip to content
Snippets Groups Projects
Commit 07660986 authored by Arthur Le Bars's avatar Arthur Le Bars
Browse files

authelia config path made optional in config.yml

parent e0b28ab6
No related branches found
No related tags found
2 merge requests!3release 1.0.1,!2Corrections cloud
...@@ -202,7 +202,7 @@ def make_traefik_compose_files(config, main_dir): ...@@ -202,7 +202,7 @@ def make_traefik_compose_files(config, main_dir):
traefik_compose_file.truncate(0) traefik_compose_file.truncate(0)
traefik_compose_file.write(traefik_compose_output) traefik_compose_file.write(traefik_compose_output)
if config["authelia_config_path"]: if authelia_config_path in config.keys():
if not config["authelia_config_path"] == "" or not config["authelia_config_path"] == "/path/to/authelia/config": if not config["authelia_config_path"] == "" or not config["authelia_config_path"] == "/path/to/authelia/config":
if os.path.isfile(os.path.abspath(config["authelia_config_path"])): if os.path.isfile(os.path.abspath(config["authelia_config_path"])):
try: try:
...@@ -217,8 +217,10 @@ def make_traefik_compose_files(config, main_dir): ...@@ -217,8 +217,10 @@ def make_traefik_compose_files(config, main_dir):
# authelia_config_file.truncate(0) # authelia_config_file.truncate(0)
# authelia_config_file.write(authelia_config_output) # authelia_config_file.write(authelia_config_output)
else: else:
logging.critical("Cannot find authelia configuration template path (%s)" % config["authelia_config_path"]) logging.critical("Cannot find authelia configuration path (%s)" % config["authelia_config_path"])
sys.exit() sys.exit()
else:
logging.critical("Invalid authelia configuration path (%s)" % config["authelia_config_path"])
# Path to the authelia users in the repo # Path to the authelia users in the repo
authelia_users_path = script_dir + "/templates/authelia_users_template.yml" authelia_users_path = script_dir + "/templates/authelia_users_template.yml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment