mirror of
https://github.com/andrey271192/WARP-Web-UI.git
synced 2026-09-20 11:55:34 +00:00
fix: delay auth restart response
This commit is contained in:
3
app.py
3
app.py
@@ -172,10 +172,11 @@ def update_webui_credentials(user: str, password):
|
|||||||
log_event("info", "auth_config_updated", user=user, backup=backup)
|
log_event("info", "auth_config_updated", user=user, backup=backup)
|
||||||
if shutil.which("systemctl"):
|
if shutil.which("systemctl"):
|
||||||
subprocess.Popen(
|
subprocess.Popen(
|
||||||
["/bin/sh", "-c", "sleep 0.6; systemctl restart warp-webui.service"],
|
["/bin/sh", "-c", "sleep 2; systemctl restart warp-webui.service"],
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
close_fds=True,
|
close_fds=True,
|
||||||
|
start_new_session=True,
|
||||||
)
|
)
|
||||||
return 200, {
|
return 200, {
|
||||||
"ok": True,
|
"ok": True,
|
||||||
|
|||||||
Reference in New Issue
Block a user