From 200951b06a8daaaeedcfce934cf4f7e90a1bcb7c Mon Sep 17 00:00:00 2001 From: "courtmanr@gmail.com" Date: Wed, 4 Jun 2025 17:38:16 +0100 Subject: [PATCH] fix: ensure complete process cleanup during Pulse removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added pkill commands to terminate any remaining Pulse processes during removal - Prevents port conflicts when reinstalling after removal - Uses graceful kill first, then force kill after delay - Fixes issue where orphaned processes prevented service restart 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/install-pulse.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/install-pulse.sh b/scripts/install-pulse.sh index de7bbbae9..7dc1a3158 100755 --- a/scripts/install-pulse.sh +++ b/scripts/install-pulse.sh @@ -667,6 +667,13 @@ perform_remove() { systemctl stop "$SERVICE_NAME" fi systemctl disable "$SERVICE_NAME" &>/dev/null || true + + # Kill any remaining Pulse processes to prevent port conflicts + print_info "Ensuring all Pulse processes are stopped..." + pkill -f "/opt/pulse/server/index.js" 2>/dev/null || true + sleep 2 + pkill -9 -f "/opt/pulse/server/index.js" 2>/dev/null || true + rm -f "/etc/systemd/system/$SERVICE_NAME" systemctl daemon-reload