#!/bin/bash

echo "Starting Enhance Panel Core & FileRD update..."

# Ensure script is run as root
if [ "$(id -u)" -ne 0 ]; then
  echo "❌ Please run this script as root or with sudo."
  exit 1
fi

# Update and upgrade system
echo "🔄 Updating package lists..."
apt -y update

echo "⬆️ Upgrading installed packages..."
apt -y upgrade

# Install Enhance packages
echo "📦 Installing Enhance core components..."
apt install -y ecp-core ecp-filerd

echo "✅ Enhance update completed."
