From f8665c410aa4ac96dd18ca8a1d1a991cd623b806 Mon Sep 17 00:00:00 2001 From: Mo8it Date: Tue, 10 May 2022 01:26:58 +0200 Subject: [PATCH] Fix running logged_server_setup --- advlabdb/scripts/setup/server_setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/advlabdb/scripts/setup/server_setup.py b/advlabdb/scripts/setup/server_setup.py index 53dc42e..8e87dcd 100644 --- a/advlabdb/scripts/setup/server_setup.py +++ b/advlabdb/scripts/setup/server_setup.py @@ -1,6 +1,5 @@ from ..terminal_utils import run -from .logged_server_setup import __file__ as logged_server_setup_script -from .shared import LOGS_DIR +from .shared import LOGS_DIR, REPO_DIR def main(): @@ -11,7 +10,10 @@ def main(): log_file = LOGS_DIR / "server_setup.log" # Start actual server setup script with logging - run(f"python3 -u {logged_server_setup_script} | tee {log_file}") + run( + f"python3 -u -m advlabdb.scripts.setup.logged_server_setup | tee {log_file}", + cwd=REPO_DIR, + ) if __name__ == "__main__":