Compare commits
2 commits
8c64711e1c
...
009595354e
| Author | SHA1 | Date | |
|---|---|---|---|
| 009595354e | |||
| 2ecc78f934 |
2 changed files with 8 additions and 0 deletions
|
|
@ -88,6 +88,8 @@ def dump_settings(filename: str) -> None:
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
@app.route('/index')
|
@app.route('/index')
|
||||||
def index():
|
def index():
|
||||||
|
if get_setting("first_setup") == "true":
|
||||||
|
return redirect(url_for('first_setup'))
|
||||||
enable_chat = get_setting("enable_chat")
|
enable_chat = get_setting("enable_chat")
|
||||||
enable_file_viewer = get_setting("enable_file_viewer")
|
enable_file_viewer = get_setting("enable_file_viewer")
|
||||||
enable_deltachat = get_setting("enable_deltachat")
|
enable_deltachat = get_setting("enable_deltachat")
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue