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