From 2ecc78f9340ed6c1ddb7b4abd7c6e3342878edb1 Mon Sep 17 00:00:00 2001 From: Ana Custura Date: Fri, 3 Apr 2026 13:53:21 +0100 Subject: [PATCH 1/2] Add a daemon-reload command after madmail is first installed --- install_madmail.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 009595354e3d0f10a27587eb2913094c29d60411 Mon Sep 17 00:00:00 2001 From: Ana Custura Date: Fri, 3 Apr 2026 13:56:35 +0100 Subject: [PATCH 2/2] Always redirect the user to setup page if not completed --- app/routes.py | 2 ++ 1 file changed, 2 insertions(+) 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")