Skip to content

Commit

Permalink
docker overwriting config #471
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Dec 21, 2021
1 parent 3323df2 commit 59d1ee0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rootthebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 59d1ee0

Please sign in to comment.