From 59d1ee0088b95214702efc47be437b6e770b50a2 Mon Sep 17 00:00:00 2001 From: ElJeffe Date: Tue, 21 Dec 2021 15:18:08 -0500 Subject: [PATCH] docker overwriting config #471 --- rootthebox.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rootthebox.py b/rootthebox.py index 562e07fc..451077b5 100755 --- a/rootthebox.py +++ b/rootthebox.py @@ -1065,9 +1065,9 @@ def help(): if options.version: version() elif options.setup.startswith("docker"): - if not os.path.isfile(options.sql_database) and not os.path.isfile( - "%s.db" % options.sql_database - ): + if os.path.isfile(options.config): + options.parse_config_file(options.config) + else: logging.info("Running Docker Setup") options.sql_database = "files/rootthebox.db" options.admin_ips = [] # Remove admin ips due to docker 127.0.0.1 mapping @@ -1076,8 +1076,6 @@ def help(): options_parse_environment() # Pick up env vars before saving config file. save_config() setup() - else: - options.parse_config_file(options.config) options.start = True elif options.save or not os.path.isfile(options.config): save_config()