#!/bin/bash set -euo pipefail # Load IP configuration SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true # Analyze running services on r630-01 and check for port conflicts # Identify services that should be in NPMplus PROXMOX_HOST="${PROXMOX_HOST_R630_01}" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "📊 Service Analysis for r630-01" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" echo "=== Running Containers with IPs ===" echo "" # Get running containers with their IPs ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" " pct list 2>/dev/null | grep running | while read vmid status lock name; do echo \"VMID: \$vmid - \$name\" ip=\$(pct config \$vmid 2>/dev/null | grep '^ip=' | head -1 | cut -d: -f2 | awk '{print \$1}') if [ -n \"\$ip\" ]; then echo \" IP: \$ip\" fi echo \"\" done " echo "" echo "=== Services That Should Be in NPMplus ===" echo "" echo "Based on documentation, the following services should be accessible via NPMplus:" echo "" echo "1. DBIS Services (if running on r630-01):" echo " - dbis-admin.d-bis.org → ${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}:80 (VMID 10130)" echo " - dbis-api.d-bis.org → ${IP_DBIS_API:-192.168.11.155}:3000 (VMID 10150)" echo " - dbis-api-2.d-bis.org → ${IP_DBIS_API_2:-192.168.11.156}:3000 (VMID 10151)" echo " - secure.d-bis.org → ${IP_DBIS_FRONTEND:-${IP_SERVICE_13:-${IP_SERVICE_13:-${IP_SERVICE_13:-192.168.11.13}}}0}:80 (VMID 10130)" echo "" echo "2. MIM4U Services (documented on r630-02, not r630-01):" echo " - mim4u.org → ${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-${IP_SERVICE_36:-192.168.11.36}}}}:80 (VMID 7811 - on r630-02)" echo "" echo "3. Blockchain Explorer (on different host):" echo " - explorer.d-bis.org → ${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}0}:4000 (VMID 5000 - on r630-02)" echo ""