Create data dir if `--server-config` is passed, "data_dir" field exists, but the dir doesn't exist
This commit is contained in:
parent
76d82cecea
commit
82463416f8
|
@ -41,6 +41,8 @@ def main(
|
|||
):
|
||||
logger.info("Starting bootloader server")
|
||||
|
||||
create_data_dir(data_dir)
|
||||
|
||||
env_singleton.initialize_from_file(server_config_filename)
|
||||
initialize_encryptor(data_dir)
|
||||
initialize_services(data_dir)
|
||||
|
@ -55,6 +57,11 @@ def main(
|
|||
bootloader_server_thread.join()
|
||||
|
||||
|
||||
def create_data_dir(data_dir):
|
||||
if not os.path.isdir(data_dir):
|
||||
os.makedirs(data_dir, mode=0o700)
|
||||
|
||||
|
||||
def start_island_server(should_setup_only):
|
||||
mongo_url = os.environ.get("MONGO_URL", env_singleton.env.get_mongo_url())
|
||||
wait_for_mongo_db_server(mongo_url)
|
||||
|
|
Loading…
Reference in New Issue