Files
proxmox/scripts/archive/consolidated/verify/check-blockscout-status.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

85 lines
3.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Check Blockscout status on VMID 5000 (pve2)
# Usage: ./check-blockscout-status.sh
VMID=5000
BLOCKSCOUT_URL="https://explorer.d-bis.org"
BLOCKSCOUT_API="${BLOCKSCOUT_URL}/api"
echo "========================================="
echo "Blockscout Status Check"
echo "VMID: $VMID (pve2)"
echo "URL: $BLOCKSCOUT_URL"
echo "========================================="
echo ""
# Check if container exists (run from Proxmox host)
if command -v pct &>/dev/null; then
echo "1. Checking container status..."
CONTAINER_STATUS=$(pct status $VMID 2>/dev/null || echo "not found")
if [[ "$CONTAINER_STATUS" == *"running"* ]]; then
echo " ✅ Container is running"
# Check Blockscout service inside container
echo ""
echo "2. Checking Blockscout service..."
SERVICE_STATUS=$(pct exec $VMID -- systemctl is-active blockscout.service 2>/dev/null || echo "inactive")
if [[ "$SERVICE_STATUS" == "active" ]]; then
echo " ✅ Blockscout service is active"
else
echo " ⚠️ Blockscout service is $SERVICE_STATUS"
echo " 💡 Start with: pct exec $VMID -- systemctl start blockscout"
fi
# Check docker containers
echo ""
echo "3. Checking Docker containers..."
DOCKER_PS=$(pct exec $VMID -- docker ps --format "{{.Names}}: {{.Status}}" 2>/dev/null || echo "")
if echo "$DOCKER_PS" | grep -q blockscout; then
echo " ✅ Blockscout containers running:"
echo "$DOCKER_PS" | grep blockscout | sed 's/^/ /'
else
echo " ⚠️ No Blockscout containers running"
fi
else
echo " ⚠️ Container status: $CONTAINER_STATUS"
echo " 💡 Start container: pct start $VMID"
fi
else
echo " ⚠️ pct command not available (not on Proxmox host)"
fi
# Check API accessibility
echo ""
echo "4. Checking API accessibility..."
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 5 "$BLOCKSCOUT_API" 2>/dev/null || echo "000")
if [[ "$HTTP_CODE" == "200" ]]; then
echo " ✅ API is accessible (HTTP $HTTP_CODE)"
elif [[ "$HTTP_CODE" == "502" ]]; then
echo " ⚠️ API returns 502 Bad Gateway (service may be down)"
echo " 💡 Check Blockscout service: pct exec $VMID -- systemctl status blockscout"
elif [[ "$HTTP_CODE" == "000" ]]; then
echo " ❌ API is not accessible (connection timeout/failed)"
else
echo " ⚠️ API returned HTTP $HTTP_CODE"
fi
echo ""
echo "========================================="
echo "Summary"
echo "========================================="
echo "Blockscout URL: $BLOCKSCOUT_URL"
echo "API Endpoint: $BLOCKSCOUT_API"
echo "Container: $VMID (pve2)"
echo ""
echo "To start Blockscout:"
echo " pct exec $VMID -- systemctl start blockscout"
echo ""
echo "To check service status:"
echo " pct exec $VMID -- systemctl status blockscout"
echo ""
echo "To check logs:"
echo " pct exec $VMID -- journalctl -u blockscout -n 50"