Update start.sh
Browse files1233455678910119 unmodified lines212223212425232425262728293026272829333031323311 unmodified lines45464751484950#!/bin/bash
# 1. Move to the Hugging Face Bucket (Persistent Storage)# 1. Bucket Permission Bypassif [ -d "/data" ]; then echo "[System] Bucket found! Moving to /data..." echo "[System] Bucket found! Executing Root Bypass to take ownership of /data..." # Forcefully take ownership of the bucket so we can write to it sudo chown -R minecraft:minecraft /data sudo chmod -R 775 /data cd /dataelse echo "[Warning] No /data bucket found. World will reset on restart!"9 unmodified lines
mkdir -p plugins/EaglercraftXServer
# 3. Auto-Download EaglerXServer (Latest Release)# 3. Bypass GitHub API Rate Limits (Hardcoded Direct Link)if [ ! -f "plugins/EaglerXServer.jar" ]; then echo "[System] Fetching latest EaglerXServer..." EAGLER_URL=$(curl -s https://api.github.com/repos/lax1dude/eaglerxserver/releases/latest | jq -r '.assets[] | select(.name | startswith("EaglerXServer") and endswith(".jar")) | .browser_download_url' | head -n 1) # Fallback to 1.0.8 if GitHub API rate-limits us if [ -z "$EAGLER_URL" ] || [ "$EAGLER_URL" == "null" ]; then EAGLER_URL="https://github.com/lax1dude/eaglerxserver/releases/download/v1.0.8/EaglerXServer-1.0.8.jar" fi curl -L -s -o plugins/EaglerXServer.jar "$EAGLER_URL" echo "[System] Fetching EaglerXServer (Direct Link Bypass)..." curl -L -s -o plugins/EaglerXServer.jar "https://github.com/lax1dude/eaglerxserver/releases/download/v1.0.8/EaglerXServer-1.0.8.jar"fi
# 4. Auto-Download ViaVersion & ViaBackwards (Allows 1.8 Eagler clients to join 1.12.2)# 4. Download ViaVersion & ViaBackwards (Modrinth API)if [ ! -f "plugins/ViaVersion.jar" ]; then echo "[System] Fetching ViaVersion..." VIA_URL=$(curl -s "https://api.modrinth.com/v2/project/viaversion/version" | jq -r '[.[] | select(.loaders[] | contains("paper"))][0].files[0].url')11 unmodified linesecho "online-mode=false" >> server.properties
# 6. Configure EaglerXServer to listen on Hugging Face Port 7860# (Hugging Face ONLY exposes 7860, so Eaglercraft must use it)cat << 'EOF' > plugins/EaglercraftXServer/listeners.ymllisteners:- address: 0.0.0.0:7860start.sh+9-13