#!/bin/bash
# Quick check of container services on r630-02

PROXMOX_HOST="${PROXMOX_HOST:-192.168.11.12}"

echo "=== Container Status Summary ==="
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct list" 2>&1

echo ""
echo "=== Key Services ==="

# Blockscout
echo "VMID 5000 (Blockscout):"
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec 5000 -- systemctl is-active blockscout nginx docker 2>&1 | grep -v 'inactive'"

# Cloudflare
echo "VMID 102 (Cloudflare):"
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec 102 -- systemctl is-active cloudflared 2>&1"

# Gitea
echo "VMID 104 (Gitea):"
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec 104 -- systemctl is-active gitea 2>&1"

# Firefly nodes
echo "VMID 6200 (Firefly-1):"
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec 6200 -- docker ps --format '{{.Names}}' 2>&1 | head -3"

echo "VMID 6201 (Firefly-ali-1):"
ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" "pct exec 6201 -- docker ps --format '{{.Names}}' 2>&1 | head -3"
