#!/bin/bash
set -euo pipefail
# Quick script to check what's deployed on the target

echo "Checking deployed files on target..."
echo ""

echo "1. Web UI files:"
ssh archipelago@192.168.1.228 "ls -lh /opt/archipelago/web-ui/ | head -10"

echo ""
echo "2. Backend binary:"
ssh archipelago@192.168.1.228 "ls -lh /usr/local/bin/archipelago"

echo ""
echo "3. Backend service status:"
ssh archipelago@192.168.1.228 "sudo systemctl status archipelago --no-pager | head -15"

echo ""
echo "4. Nginx status:"
ssh archipelago@192.168.1.228 "sudo systemctl status nginx --no-pager | head -10"

echo ""
echo "5. Check one of the JS files for BUNDLED_APPS:"
ssh archipelago@192.168.1.228 "grep -l 'BUNDLED_APPS' /opt/archipelago/web-ui/assets/*.js | head -1"
