fix: web-based first-run setup — removes terminal input(), works under systemd

This commit is contained in:
2026-04-01 12:26:17 +02:00
parent d9db41b0b4
commit 6574481647
3 changed files with 178 additions and 5 deletions
+3 -5
View File
@@ -129,10 +129,6 @@ def run_server(config: uvicorn.Config):
# ── Entrypoint ─────────────────────────────────────────────────────────────────
if __name__ == "__main__":
from auth import setup_wizard, has_users
if not has_users():
setup_wizard()
cfg = load_config()
port = cfg["server"]["port"]
host = cfg.get("network", {}).get("host", "127.0.0.1")
@@ -152,7 +148,9 @@ if __name__ == "__main__":
break
time.sleep(0.1)
webbrowser.open(f"http://localhost:{port}")
from auth import has_users
start_path = "/setup" if not has_users() else "/"
webbrowser.open(f"http://localhost:{port}{start_path}")
try:
run_tray(port)