fix: ensure complete process cleanup during Pulse removal

- 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 <noreply@anthropic.com>
This commit is contained in:
courtmanr@gmail.com
2025-06-04 17:38:16 +01:00
parent 3494f5c4fd
commit 200951b06a
+7
View File
@@ -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