mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-12 21:40:41 +00:00
18 lines
473 B
Python
18 lines
473 B
Python
from ..terminal_utils import run
|
|
from .logged_server_setup import __file__ as logged_server_setup_script
|
|
from .shared import LOGS_DIR
|
|
|
|
|
|
def main():
|
|
# Create logs directory
|
|
run(f"sudo mkdir -v -p {LOGS_DIR}")
|
|
run(f"sudo chown -R admin:admin {LOGS_DIR}")
|
|
|
|
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}")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|