Updated the egg install script to create the backup folder

Removed the option for backup folder directory
This commit is contained in:
NATroutter
2026-01-13 17:57:34 +02:00
parent 02e99ac3b8
commit 4066ce43ab
3 changed files with 12 additions and 34 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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-13T17:10:05+02:00",
"exported_at": "2026-01-13T17:55:41+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",
@@ -24,7 +24,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\nDOWNLOAD_URL=\"https:\/\/downloader.hytale.com\/hytale-downloader.zip\"\r\nDOWNLOAD_FILE=\"hytale-downloader.zip\"\r\n\r\napt update\r\napt install -y curl unzip\r\n\r\ncd \/mnt\/server\r\n\r\n# Downloads and extracts the Hytale downloader\r\necho \"Starting Hytale downloader installation...\"\r\n\r\n# Download the file\r\necho \"Downloading hytale-downloader.zip...\"\r\ncurl -L -o \"${DOWNLOAD_FILE}\" \"${DOWNLOAD_URL}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download ${DOWNLOAD_URL}\"\r\n exit 1\r\nfi\r\n\r\necho \"Download completed successfully.\"\r\n\r\n# Extract the zip file\r\necho \"Extracting ${DOWNLOAD_FILE}...\"\r\nunzip -o \"${DOWNLOAD_FILE}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to extract ${DOWNLOAD_FILE}\"\r\n exit 1\r\nfi\r\n\r\necho \"Extraction completed successfully.\"\r\n\r\n# Remove the unnessasery file\r\necho \"Cleaning up...\"\r\nrm \"${DOWNLOAD_FILE}\"\r\nrm QUICKSTART.md\r\nrm hytale-downloader-windows-amd64.exe\r\n\r\necho \"Downloading start.sh script...\"\r\ncurl -L -o start.sh \"https:\/\/raw.githubusercontent.com\/NATroutter\/egg-hytale\/main\/start.sh\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download start.sh\"\r\n exit 1\r\nfi\r\n\r\necho \"Setting executable permissions...\"\r\nchmod +x .\/hytale-downloader-linux-amd64\r\nchmod +x .\/start.sh\r\n\r\necho \"Installation complete!\"",
"script": "#!\/bin\/bash\r\nDOWNLOAD_URL=\"https:\/\/downloader.hytale.com\/hytale-downloader.zip\"\r\nDOWNLOAD_FILE=\"hytale-downloader.zip\"\r\n\r\napt update\r\napt install -y curl unzip jq\r\n\r\ncd \/mnt\/server\r\n\r\n# Downloads and extracts the Hytale downloader\r\necho \"Starting Hytale downloader installation...\"\r\n\r\n# Download the file\r\necho \"Downloading hytale-downloader.zip...\"\r\ncurl -L -o \"${DOWNLOAD_FILE}\" \"${DOWNLOAD_URL}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download ${DOWNLOAD_URL}\"\r\n exit 1\r\nfi\r\n\r\necho \"Download completed successfully.\"\r\n\r\n# Extract the zip file\r\necho \"Extracting ${DOWNLOAD_FILE}...\"\r\nunzip -o \"${DOWNLOAD_FILE}\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to extract ${DOWNLOAD_FILE}\"\r\n exit 1\r\nfi\r\n\r\necho \"Extraction completed successfully.\"\r\n\r\n# Remove the unnessasery file\r\necho \"Cleaning up...\"\r\nrm \"${DOWNLOAD_FILE}\"\r\nrm QUICKSTART.md\r\nrm hytale-downloader-windows-amd64.exe\r\n\r\n# Check if the directory exists\r\nif [ ! -d \"\/mnt\/server\/backup\" ]; then\r\n echo \"Backup directory does not exist. Creating it...\"\r\n mkdir -p \/mnt\/server\/backup\r\n\r\n if [ $? -ne 0 ]; then\r\n echo \"Failed to create backup directory: \/backup\"\r\n exit 1\r\n fi\r\nelse\r\n echo \"Directory already exists.\"\r\nfi\r\nchmod 666 \/mnt\/server\/backup\r\n\r\necho \"Downloading start.sh script...\"\r\ncurl -L -o start.sh \"https:\/\/raw.githubusercontent.com\/NATroutter\/egg-hytale\/main\/start.sh\"\r\n\r\nif [ $? -ne 0 ]; then\r\n echo \"Error: Failed to download start.sh\"\r\n exit 1\r\nfi\r\n\r\necho \"Setting executable permissions...\"\r\nchmod +x .\/hytale-downloader-linux-amd64\r\nchmod +x .\/start.sh\r\n\r\necho \"Installation complete!\"",
"container": "ghcr.io\/pterodactyl\/installers:debian",
"entrypoint": "bash"
}
@@ -80,16 +80,6 @@
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Backup Directory",
"description": "Directory where backups are saved",
"env_variable": "BACKUP_DIRECTORY",
"default_value": "\/backup",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Backup Frequency",
"description": "Backup interval in minutes",

View File

@@ -259,7 +259,7 @@ fi
# Add backup parameters if enabled
if [ "${ENABLE_BACKUPS}" = "1" ]; then
JAVA_CMD="${JAVA_CMD} --backup --backup-dir ${BACKUP_DIRECTORY} --backup-frequency ${BACKUP_FREQUENCY}"
JAVA_CMD="${JAVA_CMD} --backup --backup-dir ./backup --backup-frequency ${BACKUP_FREQUENCY}"
fi
# Add session tokens and owner UUID