diff --git a/app/routes.py b/app/routes.py index ab7d9b0..d0bfa3b 100644 --- a/app/routes.py +++ b/app/routes.py @@ -88,6 +88,8 @@ def dump_settings(filename: str) -> None: @app.route('/') @app.route('/index') def index(): + if get_setting("first_setup") == "true": + return redirect(url_for('first_setup')) enable_chat = get_setting("enable_chat") enable_file_viewer = get_setting("enable_file_viewer") enable_deltachat = get_setting("enable_deltachat") diff --git a/install_madmail.py b/install_madmail.py index be9e996..2fc3976 100644 --- a/install_madmail.py +++ b/install_madmail.py @@ -1,6 +1,7 @@ import pexpect import json from app import app +from subprocess import run def run_madmail_installer(): with open("./settings.txt", "r") as f: @@ -69,3 +70,8 @@ def run_madmail_installer(): child.expect("Enable logging for the server") child.sendline("y") child.expect(pexpect.EOF) + + +daemon_reload = run(["sudo", "systemctl", "daemon-reload"], capture_output=True, text=True) +if daemon_reload.returncode != 0: + print(f"Issue running systemctl daemon_reload") \ No newline at end of file