mirror of
https://github.com/NATroutter/egg-hytale.git
synced 2026-07-15 21:47:20 +03:00
Updated the start script to extract the files properly
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"version": "PLCN_v3",
|
||||
"update_url": "https://cdn.nat.gg/egg/egg-hytale.pelican.json"
|
||||
},
|
||||
"exported_at": "2026-01-13T13:55:29+00:00",
|
||||
"exported_at": "2026-01-13T14:49:27+00:00",
|
||||
"name": "Hytale",
|
||||
"author": "contact@natroutter.fi",
|
||||
"uuid": "6594b287-2d7b-4249-bc93-4d40283c57e3",
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"config": {
|
||||
"files": "{}",
|
||||
"startup": "{\n \"done\": \"Done!\"\n}",
|
||||
"startup": "{\n \"done\": \"Hytale Server Booted!\"\n}",
|
||||
"logs": "{}",
|
||||
"stop": "stop"
|
||||
},
|
||||
@@ -49,8 +49,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean",
|
||||
"required"
|
||||
"boolean"
|
||||
],
|
||||
"sort": 4
|
||||
},
|
||||
@@ -62,8 +61,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean",
|
||||
"required"
|
||||
"boolean"
|
||||
],
|
||||
"sort": 2
|
||||
},
|
||||
@@ -89,9 +87,9 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"required",
|
||||
"string",
|
||||
"in:authenticated,offline"
|
||||
"in:authenticated,offline",
|
||||
"required"
|
||||
],
|
||||
"sort": 5
|
||||
},
|
||||
@@ -103,7 +101,6 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"required",
|
||||
"boolean"
|
||||
],
|
||||
"sort": 11
|
||||
@@ -116,7 +113,6 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"required",
|
||||
"string"
|
||||
],
|
||||
"sort": 7
|
||||
@@ -143,8 +139,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean",
|
||||
"required"
|
||||
"boolean"
|
||||
],
|
||||
"sort": 10
|
||||
},
|
||||
@@ -156,8 +151,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"boolean",
|
||||
"required"
|
||||
"boolean"
|
||||
],
|
||||
"sort": 6
|
||||
},
|
||||
@@ -195,7 +189,6 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": [
|
||||
"required",
|
||||
"boolean"
|
||||
],
|
||||
"sort": 9
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": "https:\/\/raw.githubusercontent.com\/NATroutter\/egg-hytale\/refs\/heads\/main\/egg-hytale.pterodactyl.json"
|
||||
},
|
||||
"exported_at": "2026-01-13T15:50:57+02:00",
|
||||
"exported_at": "2026-01-13T16:50:03+02:00",
|
||||
"name": "Hytale",
|
||||
"author": "contact@natroutter.fi",
|
||||
"description": "Hytale is a block-based sandbox game that blends creative building with RPG adventure. Explore procedurally generated worlds filled with unique biomes, dungeons, and creatures. Build anything from simple homes to grand castles, craft items, and battle monsters. Create custom content with built-in modding tools, host your own servers, and shape the experience with plugins and mods. Play solo or with friends in a world designed for both creation and exploration.\r\n\r\nCredits:\r\n- Made by NATroutter\r\n- https:\/\/natroutter.fi\r\n- https:\/\/github.com\/NATroutter",
|
||||
@@ -18,7 +18,7 @@
|
||||
"startup": ".\/start.sh",
|
||||
"config": {
|
||||
"files": "{}",
|
||||
"startup": "{\r\n \"done\": \"Done!\"\r\n}",
|
||||
"startup": "{\r\n \"done\": \"Hytale Server Booted!\"\r\n}",
|
||||
"logs": "{}",
|
||||
"stop": "stop"
|
||||
},
|
||||
|
||||
45
start.sh
45
start.sh
@@ -12,6 +12,39 @@
|
||||
|
||||
DOWNLOADER="./hytale-downloader-linux-amd64"
|
||||
|
||||
# Create Hytale directory if it doesn't exist
|
||||
if [ ! -d "Hytale" ]; then
|
||||
mkdir -p Hytale
|
||||
fi
|
||||
|
||||
# Function to extract downloaded server files
|
||||
extract_server_files() {
|
||||
echo "Extracting server files..."
|
||||
SERVER_ZIP="game.zip"
|
||||
|
||||
if [ -f "$SERVER_ZIP" ]; then
|
||||
echo "Found server archive: $SERVER_ZIP"
|
||||
|
||||
# Extract to current directory
|
||||
unzip -o "$SERVER_ZIP"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: Failed to extract $SERVER_ZIP"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Extraction completed successfully."
|
||||
|
||||
# Clean up the zip file
|
||||
echo "Cleaning up archive file..."
|
||||
rm "$SERVER_ZIP"
|
||||
echo "✓ Archive removed."
|
||||
else
|
||||
echo "Error: Server archive not found at $SERVER_ZIP"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if the downloader exists
|
||||
if [ ! -f "$DOWNLOADER" ]; then
|
||||
echo "Error: Hytale downloader not found!"
|
||||
@@ -30,18 +63,20 @@ if [ ! -f ".hytale-downloader-credentials.json" ]; then
|
||||
echo "Credentials file not found, running initial setup..."
|
||||
echo "Starting Hytale downloader..."
|
||||
$DOWNLOADER -check-update
|
||||
$DOWNLOADER
|
||||
$DOWNLOADER -download-path game.zip
|
||||
extract_server_files
|
||||
fi
|
||||
|
||||
# Run automatic update if enabled
|
||||
if [ "${AUTOMATIC_UPDATE}" = "1" ]; then
|
||||
echo "Starting Hytale downloader..."
|
||||
$DOWNLOADER -check-update
|
||||
$DOWNLOADER
|
||||
$DOWNLOADER -download-path game.zip
|
||||
extract_server_files
|
||||
fi
|
||||
|
||||
# Check if server files were downloaded correctly
|
||||
if [ ! -f "HytaleServer.jar" ]; then
|
||||
if [ ! -f "Server/HytaleServer.jar" ]; then
|
||||
echo "Error: HytaleServer.jar not found!"
|
||||
echo "Server files were not downloaded correctly."
|
||||
exit 1
|
||||
@@ -182,7 +217,7 @@ JAVA_CMD="java"
|
||||
|
||||
# Add AOT cache if enabled
|
||||
if [ "${LEVERAGE_AHEAD_OF_TIME_CACHE}" = "1" ]; then
|
||||
JAVA_CMD="${JAVA_CMD} -XX:AOTCache=HytaleServer.aot"
|
||||
JAVA_CMD="${JAVA_CMD} -XX:AOTCache=Server/HytaleServer.aot"
|
||||
fi
|
||||
|
||||
# Add max memory if set and greater than 0
|
||||
@@ -195,7 +230,7 @@ if [ -n "${JVM_ARGS}" ]; then
|
||||
JAVA_CMD="${JAVA_CMD} ${JVM_ARGS}"
|
||||
fi
|
||||
|
||||
JAVA_CMD="${JAVA_CMD} -jar HytaleServer.jar"
|
||||
JAVA_CMD="${JAVA_CMD} -jar Server/HytaleServer.jar"
|
||||
|
||||
# Add assets parameter if set and ends with .zip
|
||||
if [ -n "${ASSET_PACK}" ] && [[ "${ASSET_PACK}" == *.zip ]]; then
|
||||
|
||||
Reference in New Issue
Block a user