#!/usr/bin/env bash set -euo pipefail PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" require_ubuntu() { if [[ ! -f /etc/os-release ]]; then echo "Unsupported OS: missing /etc/os-release" exit 1 fi # shellcheck disable=SC1091 source /etc/os-release if [[ "${ID:-}" != "ubuntu" ]]; then echo "This one-click installer currently supports Ubuntu only." exit 1 fi } ensure_executable_scripts() { chmod +x "${PROJECT_DIR}/scripts/install-ubuntu.sh" chmod +x "${PROJECT_DIR}/scripts/bootstrap-dev.sh" chmod +x "${PROJECT_DIR}/scripts/migrate-dev.sh" } main() { require_ubuntu ensure_executable_scripts echo "YakPanel one-click installer started..." cd "${PROJECT_DIR}" "${PROJECT_DIR}/scripts/install-ubuntu.sh" echo echo "YakPanel installation completed." echo "API health: http://localhost:8080/health" echo "MinIO console: http://localhost:9001" echo "NATS monitor: http://localhost:8222" } main "$@"