From 472978bf0685d1613e8350004cbe86c4a2f95ab3 Mon Sep 17 00:00:00 2001 From: cschantz Date: Thu, 6 Nov 2025 16:54:17 -0500 Subject: [PATCH] Deduplicate port 9850 in network connectivity display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 9850 was showing twice because it listens on both IPv4 (127.0.0.1) and IPv6 (::1). Added awk deduplication to show each port only once. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/backup/acronis-agent-status.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/backup/acronis-agent-status.sh b/modules/backup/acronis-agent-status.sh index 11e75ac..49c6665 100755 --- a/modules/backup/acronis-agent-status.sh +++ b/modules/backup/acronis-agent-status.sh @@ -157,8 +157,14 @@ echo "" # Check active ports echo -e "${BOLD}Network Connectivity:${NC}" -# Check for actual Acronis listening ports -acronis_ports=$(netstat -tlnp 2>/dev/null | grep -E "(acronis|mms|aakore)" | awk '{print $4 " " $7}' | sort -u) +# Check for actual Acronis listening ports (deduplicate IPv4/IPv6) +acronis_ports=$(netstat -tlnp 2>/dev/null | grep -E "(acronis|mms|aakore)" | awk '{ + split($4, addr, ":"); + port = addr[length(addr)]; + if (!seen[port]++) { + print $4 " " $7; + } +}') if [ -n "$acronis_ports" ]; then echo "Active Acronis services:"