Update start.sh
Browse files123456789 unmodified lines1819202122232425262728293031323334353611 unmodified lines48495051525354#!/bin/bash# 1. Move to the Hugging Face Bucket (Persistent Storage)if [ -d "/data" ]; thenecho "[System] Bucket found! Moving to /data..."cd /dataelseecho "[Warning] No /data bucket found. World will reset on restart!"9 unmodified linesmkdir -p plugins/EaglercraftXServer# 3. Auto-Download EaglerXServer (Latest Release)if [ ! -f "plugins/EaglerXServer.jar" ]; thenecho "[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 usif [ -z "$EAGLER_URL" ] || [ "$EAGLER_URL" == "null" ]; thenEAGLER_URL="https://github.com/lax1dude/eaglerxserver/releases/download/v1.0.8/EaglerXServer-1.0.8.jar"ficurl -L -s -o plugins/EaglerXServer.jar "$EAGLER_URL"fi# 4. Auto-Download ViaVersion & ViaBackwards (Allows 1.8 Eagler clients to join 1.12.2)if [ ! -f "plugins/ViaVersion.jar" ]; thenecho "[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:786012345678910119 unmodified lines2122232425262728293031323311 unmodified lines454647484950#!/bin/bash# 1. Bucket Permission Bypassif [ -d "/data" ]; thenecho "[System] Bucket found! Executing Root Bypass to take ownership of /data..."# Forcefully take ownership of the bucket so we can write to itsudo chown -R minecraft:minecraft /datasudo chmod -R 775 /datacd /dataelseecho "[Warning] No /data bucket found. World will reset on restart!"9 unmodified linesmkdir -p plugins/EaglercraftXServer# 3. Bypass GitHub API Rate Limits (Hardcoded Direct Link)if [ ! -f "plugins/EaglerXServer.jar" ]; thenecho "[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. Download ViaVersion & ViaBackwards (Modrinth API)if [ ! -f "plugins/ViaVersion.jar" ]; thenecho "[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 7860cat << 'EOF' > plugins/EaglercraftXServer/listeners.ymllisteners:- address: 0.0.0.0:7860
start.sh+9-13