Complete markdown files cleanup and organization
- Organized 252 files across project - Root directory: 187 → 2 files (98.9% reduction) - Moved configuration guides to docs/04-configuration/ - Moved troubleshooting guides to docs/09-troubleshooting/ - Moved quick start guides to docs/01-getting-started/ - Moved reports to reports/ directory - Archived temporary files - Generated comprehensive reports and documentation - Created maintenance scripts and guides All files organized according to established standards.
This commit is contained in:
53
scripts/verify-conversion.sh
Executable file
53
scripts/verify-conversion.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
# Verify all IP conversions completed successfully
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Verifying IP Conversions ==="
|
||||
echo ""
|
||||
|
||||
# Expected conversions
|
||||
declare -a EXPECTED=(
|
||||
"192.168.11.10:3501:192.168.11.28:ccip-monitor-1"
|
||||
"192.168.11.10:3500:192.168.11.29:oracle-publisher-1"
|
||||
"192.168.11.12:103:192.168.11.30:omada"
|
||||
"192.168.11.12:104:192.168.11.31:gitea"
|
||||
"192.168.11.12:100:192.168.11.32:proxmox-mail-gateway"
|
||||
"192.168.11.12:101:192.168.11.33:proxmox-datacenter-manager"
|
||||
"192.168.11.12:102:192.168.11.34:cloudflared"
|
||||
"192.168.11.12:6200:192.168.11.35:firefly-1"
|
||||
"192.168.11.12:7811:192.168.11.36:mim-api-1"
|
||||
)
|
||||
|
||||
success_count=0
|
||||
fail_count=0
|
||||
|
||||
for conversion in "${EXPECTED[@]}"; do
|
||||
IFS=':' read -r host_ip vmid expected_ip name <<< "$conversion"
|
||||
|
||||
# Get actual IP from config
|
||||
actual_ip=$(ssh -o ConnectTimeout=5 root@"$host_ip" "pct config $vmid 2>/dev/null | grep '^net0:' | grep -oE 'ip=[^,]+' | cut -d= -f2 | cut -d'/' -f1" 2>/dev/null || echo "")
|
||||
|
||||
if [ "$actual_ip" = "$expected_ip" ]; then
|
||||
echo "✓ VMID $vmid ($name): $expected_ip - OK"
|
||||
success_count=$((success_count + 1))
|
||||
else
|
||||
echo "✗ VMID $vmid ($name): Expected $expected_ip, got $actual_ip - FAILED"
|
||||
fail_count=$((fail_count + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Verification Summary ==="
|
||||
echo "Successful: $success_count"
|
||||
echo "Failed: $fail_count"
|
||||
|
||||
if [ $fail_count -eq 0 ]; then
|
||||
echo ""
|
||||
echo "✓ All conversions verified successfully!"
|
||||
exit 0
|
||||
else
|
||||
echo ""
|
||||
echo "✗ Some verifications failed"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user