diff --git a/backend/main.py b/backend/main.py index 2817350..5e053cf 100644 --- a/backend/main.py +++ b/backend/main.py @@ -444,6 +444,15 @@ async def api_eteindre(): return {"succes": True} +@app.post("/api/systeme/quitter-navigateur") +async def api_quitter_navigateur(): + import subprocess + log.warning("Fermeture navigateur demandee") + subprocess.Popen(["pkill", "-f", "firefox"]) + subprocess.Popen(["pkill", "-f", "chromium"]) + return {"succes": True} + + # --- WebSocket --- @app.websocket("/ws") diff --git a/frontend/index.html b/frontend/index.html index 5050f0e..ae1e8a9 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -486,6 +486,7 @@