Add a daemon-reload command after madmail is first installed

This commit is contained in:
Ana Custura 2026-04-03 13:53:21 +01:00
parent 8c64711e1c
commit 2ecc78f934

View file

@ -1,6 +1,7 @@
import pexpect import pexpect
import json import json
from app import app from app import app
from subprocess import run
def run_madmail_installer(): def run_madmail_installer():
with open("./settings.txt", "r") as f: with open("./settings.txt", "r") as f:
@ -69,3 +70,8 @@ def run_madmail_installer():
child.expect("Enable logging for the server") child.expect("Enable logging for the server")
child.sendline("y") child.sendline("y")
child.expect(pexpect.EOF) 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")