#!/bin/bash

# Quick service status check

echo "🔍 SkyArtShop Service Status"
echo "=============================="
echo ""

# Check if service is active
if sudo systemctl is-active --quiet skyartshop; then
    echo "✅ Service is RUNNING"
else
    echo "❌ Service is STOPPED"
fi

echo ""
echo "📊 Detailed Status:"
sudo systemctl status skyartshop --no-pager -l

echo ""
echo "🌐 Testing localhost:5000..."
if curl -s -o /dev/null -w "%{http_code}" http://localhost:5000 | grep -q "200\|301\|302"; then
    echo "✅ Website is responding"
else
    echo "⚠️  Website not responding"
fi

echo ""
echo "📝 Recent logs (last 10 lines):"
sudo journalctl -u skyartshop -n 10 --no-pager
