From c42c288c6220af551adc605078f55a672894d264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Sun, 29 Mar 2026 12:30:38 +0200 Subject: [PATCH] Added trap exit to kill the python process --- deploy.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 0ea3ed6..dae1310 100644 --- a/deploy.sh +++ b/deploy.sh @@ -11,7 +11,7 @@ launch_configurator() { echo -e "\n 🚀 Launching Numbus Configurator..." python3 "${BRIDGE_SCRIPT}" > /dev/null 2>&1 & - BRIDGE_PID=$! + export BRIDGE_PID=$! echo -e "\n ➡️ Open your browser at: $(gum style --foreground 212 "http://localhost:${PORT}")" xdg-open "http://localhost:${PORT}" 2>/dev/null || open "http://localhost:${PORT}" 2>/dev/null || true @@ -737,6 +737,10 @@ nix_update() { --use-remote-sudo switch --flake configuration/etc/nixos#numbus-server } +cleanup() { + kill ${BRIDGE_PID} +} + set -euo pipefail clear @@ -763,6 +767,8 @@ echo " sleep 1 +trap cleanup EXIT + # --- MAIN ORCHESTRATION LOOP --- # 0. TESTING ONLY