#!/usr/bin/env bash # Fix NPMplus (VMID 10233) network: set correct IP and gateway, then start container. # Run on Proxmox host r630-01 or: ssh root@192.168.11.11 'bash -s' < scripts/npmplus/fix-npmplus-ip-and-gateway.sh # Uses: IP 192.168.11.167 (UDM Pro), gateway 192.168.11.1. set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" [ -f "${PROJECT_ROOT}/config/ip-addresses.conf" ] && source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true VMID="${NPMPLUS_VMID:-10233}" NPM_IP="${IP_NPMPLUS:-192.168.11.167}" GATEWAY="${NETWORK_GATEWAY:-192.168.11.1}" if ! command -v pct &>/dev/null; then echo "Run this script on the Proxmox host (e.g. ssh root@192.168.11.11)" exit 1 fi echo "NPMplus VMID $VMID: set IP=$NPM_IP gateway=$GATEWAY and start" pct set "$VMID" --net0 name=eth0,bridge=vmbr0,ip="${NPM_IP}/24",gw="${GATEWAY}" 2>/dev/null || true pct stop "$VMID" 2>/dev/null || true sleep 2 pct start "$VMID" echo "Started. Wait ~30s then run verify-npmplus-running-and-network.sh"