fix: web-based first-run setup — removes terminal input(), works under systemd
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user