Files
solace-bg-dubai/scripts/proxmox-recreate-cts.sh
defiQUG a03417be98
All checks were successful
CI / lint-and-test (push) Successful in 9m52s
chore: consolidate local WIP (repo cleanup 20260707)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:41:38 -07:00

24 lines
651 B
Bash

#!/usr/bin/env bash
# Destroy and recreate Solace CTs 3000-3003 on the Proxmox node where they live.
set -euo pipefail
PROXMOX_HOST="${PROXMOX_HOST:-192.168.11.11}"
PROXMOX_USER="${PROXMOX_USER:-root}"
echo "Recreating Solace CTs on $PROXMOX_HOST (3000-3003)..."
ssh "$PROXMOX_USER@$PROXMOX_HOST" bash -s <<'EOF'
set -euo pipefail
for vmid in 3003 3002 3001 3000; do
if pct status "$vmid" &>/dev/null; then
echo "Stopping and destroying CT $vmid..."
pct stop "$vmid" || true
sleep 2
pct destroy "$vmid" || true
fi
done
pct list | grep -E '300[0-3]' || echo "All Solace CTs removed."
EOF
echo "Done. Run deploy-remote.sh next."