forked from p15670423/monkey
island: Pass data_dir to main()
This commit is contained in:
parent
c832738a8a
commit
b4dfba294b
|
@ -32,4 +32,4 @@ if "__main__" == __name__:
|
|||
|
||||
from monkey_island.cc.main import main # noqa: E402
|
||||
|
||||
main(island_args.setup_only, island_args.server_config)
|
||||
main(config["data_dir"], island_args.setup_only, island_args.server_config)
|
||||
|
|
|
@ -34,10 +34,13 @@ from monkey_island.cc.setup import setup # noqa: E402
|
|||
MINIMUM_MONGO_DB_VERSION_REQUIRED = "4.2.0"
|
||||
|
||||
|
||||
def main(should_setup_only=False, server_config_filename=DEFAULT_SERVER_CONFIG_PATH):
|
||||
def main(
|
||||
data_dir,
|
||||
should_setup_only=False,
|
||||
server_config_filename=DEFAULT_SERVER_CONFIG_PATH,
|
||||
):
|
||||
logger.info("Starting bootloader server")
|
||||
|
||||
data_dir = env_singleton.env.get_config().data_dir_abs_path
|
||||
env_singleton.initialize_from_file(server_config_filename)
|
||||
initialize_encryptor(data_dir)
|
||||
initialize_services(data_dir)
|
||||
|
|
Loading…
Reference in New Issue