From b96fad427128ae37824f66ca24949a36ab550d84 Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Mon, 12 May 2025 19:21:43 +0200 Subject: [PATCH 01/10] Add gtnh egg json and readmes --- README.md | 1 + java/README.md | 5 ++ java/gtnh/README.md | 18 +++++++ java/gtnh/egg-greg-tech--new-horizons.json | 56 ++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 java/gtnh/README.md create mode 100644 java/gtnh/egg-greg-tech--new-horizons.json diff --git a/README.md b/README.md index 446dfddc..6535563b 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ It’s set in infinitely-generated worlds of wide open terrain - icy mountains, * [Forge](java/forge/forge) * [Feed The Beast](java/ftb) * [Glowstone](java/glowstone) +* [GregTech:New Horizons](java/gtnh) * [Limbo](java/limbo) * [Krypton](java/krypton) * [Magma](java/magma) diff --git a/java/README.md b/java/README.md index eeb2dce7..d25dfbed 100644 --- a/java/README.md +++ b/java/README.md @@ -95,6 +95,11 @@ The second method requires you to know the id for both the modpack and version i may not get updated with the correct ip address and port at first launch. Please restart the server after first launch to fix this.** +## [GregTech: New Horizons](gtnh) + +[GT:NH Wiki](https://gtnh.miraheze.org/wiki/Main_Page) +A Minecraft 1.7.10 modpack maintained and supported by dedicated community members just like you! + ## [NanoLimbo](nanolimbo) [NanoLimbo GitHub](https://github.com/Nan1t/NanoLimbo) diff --git a/java/gtnh/README.md b/java/gtnh/README.md new file mode 100644 index 00000000..8a501694 --- /dev/null +++ b/java/gtnh/README.md @@ -0,0 +1,18 @@ +# GregTech:New Horizons + +Standalone Minecraft server with GregTech:New Horizons using Java 21. + +Supports upgrading / downgrading via reinstall and keeps world, backups and some key config files. +Check installation logs for what has been removed in the process and make sure to backup any additional data. + +[GT:NH Github](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack) +[GT:NH Wiki](https://gtnh.miraheze.org/wiki/Main_Page) +[Server Setup](https://gtnh.miraheze.org/wiki/Server_Setup) + +## Server Ports + +The GT:NH server requires a single port for access (default 25565). + +| Port | default | +|-------|---------| +| Game | 25565 | diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json new file mode 100644 index 00000000..3a4b1281 --- /dev/null +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -0,0 +1,56 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", + "meta": { + "version": "PTDL_v2", + "update_url": null + }, + "exported_at": "2025-04-05T21:16:28+02:00", + "name": "GregTech:New Horizons", + "author": "DJSchaffner@outlook.com", + "description": "Minecraft GregTech:New Horizons Server", + "features": [ + "eula", + "java_version", + "pid_limit" + ], + "docker_images": { + "Java 21": "ghcr.io\/pterodactyl\/yolks:java_21" + }, + "file_denylist": [], + "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", + "config": { + "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \")! For help, type \"\r\n}", + "logs": "{}", + "stop": "stop" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\n\r\necho -e \"Installation process is completed\"", + "container": "ghcr.io\/pterodactyl\/installers:alpine", + "entrypoint": "ash" + } + }, + "variables": [ + { + "name": "GT:NH Version", + "description": "The version of GregTech:New Horizons to use. Set to \"latest\" for latest version, or specify a version number.\r\nExample: 2.7.0", + "env_variable": "GTNH_VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": "required|string|max:20", + "field_type": "text" + }, + { + "name": "Use Beta Version", + "description": "Enable if you want to use a beta version", + "env_variable": "IS_BETA_VERSION", + "default_value": "0", + "user_viewable": true, + "user_editable": true, + "rules": "required|boolean", + "field_type": "text" + } + ] +} From dcc98d0239970db231665036a9ede662929f528d Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Tue, 13 May 2025 20:14:55 +0200 Subject: [PATCH 02/10] Add restore mechanism for JourneyMapServer --- java/gtnh/egg-greg-tech--new-horizons.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index 3a4b1281..a83a0009 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -4,7 +4,7 @@ "version": "PTDL_v2", "update_url": null }, - "exported_at": "2025-04-05T21:16:28+02:00", + "exported_at": "2025-05-13T20:12:21+02:00", "name": "GregTech:New Horizons", "author": "DJSchaffner@outlook.com", "description": "Minecraft GregTech:New Horizons Server", @@ -26,7 +26,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\n\r\necho -e \"Installation process is completed\"", + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups config world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\n# Rename config (We didn't remove it in previous step because we want a backup of it now and need the JourneyMapServer folder inside)\r\nTIMESTAMP=$(date \"+%Y-%m-%d-%H-%M-%S\")\r\nCONFIG_DIR=\"config\"\r\nCONFIG_DIR_BACKUP=\"config_backup_${TIMESTAMP}\"\r\n\r\n# Check if the config directory exists\r\nif [ -d \"$CONFIG_DIR\" ]; then\r\n echo -e \"Creating backup of config folder\"\r\n \r\n mv \"$CONFIG_DIR\" \"$CONFIG_DIR_BACKUP\"\r\n mkdir \"$CONFIG_DIR\"\r\nfi\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n# Restoring JourneyMapServer folder if it exists\r\n# Copy JourneyMapServer from the backup into the new config directory\r\nif [ -d \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" ]; then\r\n echo -e \"Restoring JourneyMapServer\"\r\n cp -r \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" \"$CONFIG_DIR\/\"\r\nfi\r\n \r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\n\r\necho -e \"Installation process is completed\"", "container": "ghcr.io\/pterodactyl\/installers:alpine", "entrypoint": "ash" } From 9d149ebf2e4ea57b7b59ff17603d579bcca11f7d Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Sat, 17 May 2025 14:52:24 +0200 Subject: [PATCH 03/10] Remove config backup after install --- java/gtnh/egg-greg-tech--new-horizons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index a83a0009..c4c0f914 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -26,7 +26,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups config world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\n# Rename config (We didn't remove it in previous step because we want a backup of it now and need the JourneyMapServer folder inside)\r\nTIMESTAMP=$(date \"+%Y-%m-%d-%H-%M-%S\")\r\nCONFIG_DIR=\"config\"\r\nCONFIG_DIR_BACKUP=\"config_backup_${TIMESTAMP}\"\r\n\r\n# Check if the config directory exists\r\nif [ -d \"$CONFIG_DIR\" ]; then\r\n echo -e \"Creating backup of config folder\"\r\n \r\n mv \"$CONFIG_DIR\" \"$CONFIG_DIR_BACKUP\"\r\n mkdir \"$CONFIG_DIR\"\r\nfi\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n# Restoring JourneyMapServer folder if it exists\r\n# Copy JourneyMapServer from the backup into the new config directory\r\nif [ -d \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" ]; then\r\n echo -e \"Restoring JourneyMapServer\"\r\n cp -r \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" \"$CONFIG_DIR\/\"\r\nfi\r\n \r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\n\r\necho -e \"Installation process is completed\"", + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups config world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\n# Rename config (We didn't remove it in previous step because we want a backup of it now and need the JourneyMapServer folder inside)\r\nTIMESTAMP=$(date \"+%Y-%m-%d-%H-%M-%S\")\r\nCONFIG_DIR=\"config\"\r\nCONFIG_DIR_BACKUP=\"config_backup_${TIMESTAMP}\"\r\n\r\n# Check if the config directory exists\r\nif [ -d \"$CONFIG_DIR\" ]; then\r\n echo -e \"Creating backup of config folder\"\r\n \r\n mv \"$CONFIG_DIR\" \"$CONFIG_DIR_BACKUP\"\r\n mkdir \"$CONFIG_DIR\"\r\nfi\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n# Restoring JourneyMapServer folder if it exists\r\n# Copy JourneyMapServer from the backup into the new config directory\r\nif [ -d \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" ]; then\r\n echo -e \"Restoring JourneyMapServer\"\r\n cp -r \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" \"$CONFIG_DIR\/\"\r\nfi\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", "container": "ghcr.io\/pterodactyl\/installers:alpine", "entrypoint": "ash" } From d4601ac2c5ac902998ead9c74cc4f3d0c3c4c709 Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 04:05:29 +0200 Subject: [PATCH 04/10] Modified update part of startup script + server start arguments This changes how files are deleted / preserved during server update. This version specifically deletes files which need to be deleted according to docs, and preserves those that should be preserved (the preserve variable essentially excludes files from being deleted by the delete section, and if overwriting was enabled during unzip, they would still be preserved). Also changed the -xms argument according to gtnh recommendations, which should likely be obeyed over minecraft standards since the pack uses a non-standard java for this minecraft version. Added 2 variables which dictate this new functionality, so end users can easily change behaviour should it be needed in the future. --- java/gtnh/egg-greg-tech--new-horizons.json | 30 ++++++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index c4c0f914..37936e14 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -1,10 +1,10 @@ { - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { "version": "PTDL_v2", "update_url": null }, - "exported_at": "2025-05-13T20:12:21+02:00", + "exported_at": "2025-05-24T04:00:00+02:00", "name": "GregTech:New Horizons", "author": "DJSchaffner@outlook.com", "description": "Minecraft GregTech:New Horizons Server", @@ -17,7 +17,7 @@ "Java 21": "ghcr.io\/pterodactyl\/yolks:java_21" }, "file_denylist": [], - "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", + "startup": "java -Xms{{SERVER_MEMORY}}M -Xmx{{SERVER_MEMORY}}M -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", "config": { "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \")! For help, type \"\r\n}", @@ -26,7 +26,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\n# Space separated blacklist for files to keep (limitation of ash)\r\nBLACKLIST=\"backups config world server.properties whitelist.json banned-players.json banned-ips.json ops.json\"\r\necho -e \"Removing files from previous installation (Keeping world, backups, properties, whitelist, banned players and ops)\"\r\n\r\n# Loop all files in base directory and remove files\/folders not in blacklist\r\nfor file in .\/*; do\r\n filename=$(basename \"$file\")\r\n match=false\r\n \r\n for pattern in $BLACKLIST; do\r\n if [[ \"$(echo \"$filename\" | tr '[:upper:]' '[:lower:]')\" = \"$(echo \"$pattern\" | tr '[:upper:]' '[:lower:]')\" ]]; then\r\n match=true\r\n break\r\n fi\r\n done\r\n \r\n if [ \"$match\" != true ]; then\r\n echo -e \"Removing: $filename\"\r\n rm -rf \"$file\"\r\n else\r\n echo -e \"Keeping: $filename\"\r\n fi\r\ndone\r\n\r\n# Rename config (We didn't remove it in previous step because we want a backup of it now and need the JourneyMapServer folder inside)\r\nTIMESTAMP=$(date \"+%Y-%m-%d-%H-%M-%S\")\r\nCONFIG_DIR=\"config\"\r\nCONFIG_DIR_BACKUP=\"config_backup_${TIMESTAMP}\"\r\n\r\n# Check if the config directory exists\r\nif [ -d \"$CONFIG_DIR\" ]; then\r\n echo -e \"Creating backup of config folder\"\r\n \r\n mv \"$CONFIG_DIR\" \"$CONFIG_DIR_BACKUP\"\r\n mkdir \"$CONFIG_DIR\"\r\nfi\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n# Restoring JourneyMapServer folder if it exists\r\n# Copy JourneyMapServer from the backup into the new config directory\r\nif [ -d \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" ]; then\r\n echo -e \"Restoring JourneyMapServer\"\r\n cp -r \"$CONFIG_DIR_BACKUP\/JourneyMapServer\" \"$CONFIG_DIR\/\"\r\nfi\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Backing up [${DELUPDATEEXLUDE}]\"\r\nmkdir tmpBackup\r\ncp -rafv --parents ${DELUPDATEEXLUDE} -t tmpBackup | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Removing files from previous installation; [${DELUPDATE}]\"\r\necho -e \"Only printing directories until 1 deep, and top level files.\"\r\nrm -rfv ${DELUPDATE} | grep -E \"directory[^\/]+\\\/[^\/]*$|^[^\/]+$\" | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Restoring backed up files\"\r\ncp -rafv -t .\/ tmpBackup\/* | sed 's\/^\/\\t\/'\r\nrm -rfv tmpBackup | sed 's\/^\/\\t\/'\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", "container": "ghcr.io\/pterodactyl\/installers:alpine", "entrypoint": "ash" } @@ -51,6 +51,26 @@ "user_editable": true, "rules": "required|boolean", "field_type": "text" + }, + { + "name": "Delete During Install \/ Reinstall", + "description": "These files will be deleted during install \/ reinstall", + "env_variable": "DELUPDATE", + "default_value": "config libraries mods resources scripts lwjgl3ify-forgePatches.jar java9args.txt startserver-java9.bat startserver-java9.sh", + "user_viewable": true, + "user_editable": true, + "rules": "string", + "field_type": "text" + }, + { + "name": "Do not delete these during Install \/ Reinstall", + "description": "Use this to prevent the script from deleting them during install \/ reinstall. Useful to prevent items inside folders which are deleted from being deleted\r\nExample: config\/JourneyMapServer", + "env_variable": "DELUPDATEEXLUDE", + "default_value": "config\/JourneyMapServer", + "user_viewable": true, + "user_editable": true, + "rules": "string", + "field_type": "text" } ] -} +} \ No newline at end of file From 00e915ceef10c87cc3d0402089417db04ca6e32a Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 16:44:04 +0200 Subject: [PATCH 05/10] Update java/gtnh/egg-greg-tech--new-horizons.json Co-authored-by: DJSchaffner --- java/gtnh/egg-greg-tech--new-horizons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index 37936e14..d69fb73a 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -1,5 +1,5 @@ { - "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", "meta": { "version": "PTDL_v2", "update_url": null From a5f6812a80eb209879311a6a7a2f3f0bec9c1c72 Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 16:44:15 +0200 Subject: [PATCH 06/10] Update java/gtnh/egg-greg-tech--new-horizons.json Co-authored-by: DJSchaffner --- java/gtnh/egg-greg-tech--new-horizons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index d69fb73a..ece97c6c 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -17,7 +17,7 @@ "Java 21": "ghcr.io\/pterodactyl\/yolks:java_21" }, "file_denylist": [], - "startup": "java -Xms{{SERVER_MEMORY}}M -Xmx{{SERVER_MEMORY}}M -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", + "startup": "java -XX:InitialRAMPercentage=95.0 -XX:MaxRAMPercentage=95.0 -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui", "config": { "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.build.default.port}}\",\r\n \"query.port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \")! For help, type \"\r\n}", From db8f8e47ce698e14f528508f5f5fc235530eeac4 Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 16:44:24 +0200 Subject: [PATCH 07/10] Update java/gtnh/egg-greg-tech--new-horizons.json Co-authored-by: DJSchaffner --- java/gtnh/egg-greg-tech--new-horizons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index ece97c6c..14b50079 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -55,7 +55,7 @@ { "name": "Delete During Install \/ Reinstall", "description": "These files will be deleted during install \/ reinstall", - "env_variable": "DELUPDATE", + "env_variable": "DELETE_ON_INSTALL", "default_value": "config libraries mods resources scripts lwjgl3ify-forgePatches.jar java9args.txt startserver-java9.bat startserver-java9.sh", "user_viewable": true, "user_editable": true, From 3bd8639583625a2ca8dbff80fa4e283be3c13afe Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 16:44:33 +0200 Subject: [PATCH 08/10] Update java/gtnh/egg-greg-tech--new-horizons.json Co-authored-by: DJSchaffner --- java/gtnh/egg-greg-tech--new-horizons.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index 14b50079..540c09aa 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -63,9 +63,9 @@ "field_type": "text" }, { - "name": "Do not delete these during Install \/ Reinstall", - "description": "Use this to prevent the script from deleting them during install \/ reinstall. Useful to prevent items inside folders which are deleted from being deleted\r\nExample: config\/JourneyMapServer", - "env_variable": "DELUPDATEEXLUDE", + "name": "Keep During Install \/ Reinstall", + "description": "Use this to prevent the script from deleting them during install \/ reinstall. Useful to retain items inside folders which are deleted\r\nExample: config\/JourneyMapServer", + "env_variable": "KEEP_ON_INSTALL", "default_value": "config\/JourneyMapServer", "user_viewable": true, "user_editable": true, From 26d479559813d38b7cf467d040e7c707294f6a70 Mon Sep 17 00:00:00 2001 From: Sam <23201902+samsonsin@users.noreply.github.com> Date: Sat, 24 May 2025 16:44:41 +0200 Subject: [PATCH 09/10] Update java/gtnh/egg-greg-tech--new-horizons.json Co-authored-by: DJSchaffner --- java/gtnh/egg-greg-tech--new-horizons.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-greg-tech--new-horizons.json index 540c09aa..86c3644d 100644 --- a/java/gtnh/egg-greg-tech--new-horizons.json +++ b/java/gtnh/egg-greg-tech--new-horizons.json @@ -26,7 +26,7 @@ }, "scripts": { "installation": { - "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n # Use tail just to make sure there are not multiple versions matching\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Backing up [${DELUPDATEEXLUDE}]\"\r\nmkdir tmpBackup\r\ncp -rafv --parents ${DELUPDATEEXLUDE} -t tmpBackup | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Removing files from previous installation; [${DELUPDATE}]\"\r\necho -e \"Only printing directories until 1 deep, and top level files.\"\r\nrm -rfv ${DELUPDATE} | grep -E \"directory[^\/]+\\\/[^\/]*$|^[^\/]+$\" | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Restoring backed up files\"\r\ncp -rafv -t .\/ tmpBackup\/* | sed 's\/^\/\\t\/'\r\nrm -rfv tmpBackup | sed 's\/^\/\\t\/'\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\n\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Backing up [${KEEP_ON_INSTALL}]\"\r\nmkdir tmpBackup\r\ncp -rafv --parents ${KEEP_ON_INSTALL} -t tmpBackup | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Removing files from previous installation; [${DELETE_ON_INSTALL}]\"\r\necho -e \"Only printing directories until depth of 1, and top level files.\"\r\nrm -rfv ${DELETE_ON_INSTALL} | grep -E \"directory[^\/]+\\\/[^\/]*$|^[^\/]+$\" | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Restoring backed up files\"\r\ncp -rafv -t .\/ tmpBackup\/* | sed 's\/^\/\\t\/'\r\nrm -rfv tmpBackup | sed 's\/^\/\\t\/'\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", "container": "ghcr.io\/pterodactyl\/installers:alpine", "entrypoint": "ash" } From 10c8546b1d4ca420280f005cd3d0ef5217779367 Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Mon, 5 Jan 2026 18:39:59 +0100 Subject: [PATCH 10/10] Rename original egg to pterodactyl and add pelican egg --- java/gtnh/egg-greg-tech-new-horizons.json | 92 +++++++++++++++++++ ...g-pterodactyl-greg-tech-new-horizons.json} | 0 2 files changed, 92 insertions(+) create mode 100644 java/gtnh/egg-greg-tech-new-horizons.json rename java/gtnh/{egg-greg-tech--new-horizons.json => egg-pterodactyl-greg-tech-new-horizons.json} (100%) diff --git a/java/gtnh/egg-greg-tech-new-horizons.json b/java/gtnh/egg-greg-tech-new-horizons.json new file mode 100644 index 00000000..84bcb492 --- /dev/null +++ b/java/gtnh/egg-greg-tech-new-horizons.json @@ -0,0 +1,92 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL", + "meta": { + "version": "PLCN_v3", + "update_url": null + }, + "exported_at": "2025-05-24T04:00:00+02:00", + "name": "GregTech:New Horizons", + "author": "DJSchaffner@outlook.com", + "uuid": "499bdc18-3ee6-4bc1-8e1f-00d65b8df931", + "description": "Minecraft GregTech:New Horizons Server", + "image": null, + "tags": [], + "features": [ + "eula", + "java_version", + "pid_limit" + ], + "docker_images": { + "Java 21": "ghcr.io\/pterodactyl\/yolks:java_21" + }, + "file_denylist": [], + "startup_commands": { + "Default": "java -XX:InitialRAMPercentage=95.0 -XX:MaxRAMPercentage=95.0 -Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar nogui" + }, + "config": { + "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"server-port\": \"{{server.allocations.default.port}}\",\r\n \"query.port\": \"{{server.allocations.default.port}}\"\r\n }\r\n }\r\n}", + "startup": "{\r\n \"done\": \")! For help, type \"\r\n}", + "logs": "{}", + "stop": "stop" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/ash\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server || exit 1\r\n\r\nGTNH_VERSION=\"${GTNH_VERSION\/\/ \/}\"\r\nAVAILABLE_VERSIONS=$(curl -s https:\/\/downloads.gtnewhorizons.com\/ServerPacks\/?raw)\r\nFILTERED_VERSIONS=$(echo -e \"$AVAILABLE_VERSIONS\" | grep -v -e 'Java_8.zip' | grep $([[ ${IS_BETA_VERSION:-0} -ne 1 ]] && echo \"-v \") -e '\/betas\/')\r\n\r\nif [[ \"$GTNH_VERSION\" != \"latest\" ]]; then\r\n echo -e \"Constructing download link for specified version $GTNH_VERSION\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | grep -e _\"$GTNH_VERSION\"_)\"\r\nelse\r\n echo -e \"No version specified. Getting latest available version\"\r\n DOWNLOAD_LINK=\"$(echo -e \"$FILTERED_VERSIONS\" | tail -n 1)\"\r\nfi\r\n\r\necho -e \"Download link: $DOWNLOAD_LINK\"\r\nZIP_FILE=GTNH_${GTNH_VERSION}.zip\r\n\r\nif curl --output \/dev\/null --silent --head --fail \"$DOWNLOAD_LINK\"; then\r\n echo -e \"Download link is valid\"\r\nelse\r\n echo -e \"Invalid download link - Check provided GT:NH version. Exiting now!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Backing up [${KEEP_ON_INSTALL}]\"\r\nmkdir tmpBackup\r\ncp -rafv --parents ${KEEP_ON_INSTALL} -t tmpBackup | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Removing files from previous installation; [${DELETE_ON_INSTALL}]\"\r\necho -e \"Only printing directories until depth of 1, and top level files.\"\r\nrm -rfv ${DELETE_ON_INSTALL} | grep -E \"directory[^\/]+\\\/[^\/]*$|^[^\/]+$\" | sed 's\/^\/\\t\/'\r\n\r\necho -e \"Downloading archive\"\r\ncurl -o \"$ZIP_FILE\" \"$DOWNLOAD_LINK\"\r\n\r\necho -e \"Start extracting archive\"\r\ntimeout 60s unzip -nq \"$ZIP_FILE\"\r\nif [ $? -ge 124 ]; then\r\n echo \"Extraction was unsuccessful or timed out!\"\r\n exit 1\r\nfi\r\n\r\necho -e \"Restoring backed up files\"\r\ncp -rafv -t .\/ tmpBackup\/* | sed 's\/^\/\\t\/'\r\nrm -rfv tmpBackup | sed 's\/^\/\\t\/'\r\n\r\nchmod +x lwjgl3ify-forgePatches.jar\r\nchmod +x forge-*.jar\r\n\r\necho -e \"Deleting zip file\"\r\nrm -f \"$ZIP_FILE\"\r\nrm -rf \"$CONFIG_DIR_BACKUP\"\r\n\r\necho -e \"Installation process is completed\"", + "container": "ghcr.io\/pterodactyl\/installers:alpine", + "entrypoint": "ash" + } + }, + "variables": [ + { + "name": "GT:NH Version", + "description": "The version of GregTech:New Horizons to use. Set to \"latest\" for latest version, or specify a version number.\r\nExample: 2.7.0", + "env_variable": "GTNH_VERSION", + "default_value": "latest", + "user_viewable": true, + "user_editable": true, + "rules": [ + "required", + "string", + "max:20" + ], + "sort": 1 + }, + { + "name": "Use Beta Version", + "description": "Enable if you want to use a beta version", + "env_variable": "IS_BETA_VERSION", + "default_value": "0", + "user_viewable": true, + "user_editable": true, + "rules": [ + "required", + "boolean" + ], + "sort": 2 + }, + { + "name": "Delete During Install \/ Reinstall", + "description": "These files will be deleted during install \/ reinstall", + "env_variable": "DELETE_ON_INSTALL", + "default_value": "config libraries mods resources scripts lwjgl3ify-forgePatches.jar java9args.txt startserver-java9.bat startserver-java9.sh", + "user_viewable": true, + "user_editable": true, + "rules": [ + "string" + ], + "sort": 3 + }, + { + "name": "Keep During Install \/ Reinstall", + "description": "Use this to prevent the script from deleting them during install \/ reinstall. Useful to retain items inside folders which are deleted\r\nExample: config\/JourneyMapServer", + "env_variable": "KEEP_ON_INSTALL", + "default_value": "config\/JourneyMapServer", + "user_viewable": true, + "user_editable": true, + "rules": [ + "string" + ], + "sort": 4 + } + ] +} \ No newline at end of file diff --git a/java/gtnh/egg-greg-tech--new-horizons.json b/java/gtnh/egg-pterodactyl-greg-tech-new-horizons.json similarity index 100% rename from java/gtnh/egg-greg-tech--new-horizons.json rename to java/gtnh/egg-pterodactyl-greg-tech-new-horizons.json