All checks were successful
CI / lint-and-test (push) Successful in 9m52s
Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
651 B
Bash
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."
|