From c70ce3eed3cc8244ed3214d633fcb57435322172 Mon Sep 17 00:00:00 2001 From: "Michael (Parker) Parker" Date: Sun, 15 Jul 2018 12:40:36 -0400 Subject: [PATCH] Adding forge generic support Support for forge modpacks based on pack url. --- minecraft/forge/forge-generic/README.md | 9 ++++ .../forge-generic/egg-forge-generic.json | 45 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 minecraft/forge/forge-generic/README.md create mode 100644 minecraft/forge/forge-generic/egg-forge-generic.json diff --git a/minecraft/forge/forge-generic/README.md b/minecraft/forge/forge-generic/README.md new file mode 100644 index 00000000..03468b6f --- /dev/null +++ b/minecraft/forge/forge-generic/README.md @@ -0,0 +1,9 @@ +# Forge Generic + +### This is a generic egg for curseforge modpacks + +You will need to give it a modpack URL such as `https://minecraft.curseforge.com/projects/` + +This will grabe the latest release when the version is set to latest. + +It "should" grab versions of the pack based on the modpack version numbers \ No newline at end of file diff --git a/minecraft/forge/forge-generic/egg-forge-generic.json b/minecraft/forge/forge-generic/egg-forge-generic.json new file mode 100644 index 00000000..1f6dd88b --- /dev/null +++ b/minecraft/forge/forge-generic/egg-forge-generic.json @@ -0,0 +1,45 @@ +{ + "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", + "meta": { + "version": "PTDL_v1" + }, + "exported_at": "2018-07-15T12:35:48-04:00", + "name": "Forge Generic", + "author": "parker@parkervcp.com", + "description": "A generic egg for a forge modpack", + "image": "quay.io\/pterodactyl\/core:java", + "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar server.jar", + "config": { + "files": "{\r\n \"server.properties\": {\r\n \"parser\": \"properties\",\r\n \"find\": {\r\n \"server-ip\": \"0.0.0.0\",\r\n \"enable-query\": \"true\",\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 \"userInteraction\": [\r\n \"Go to eula.txt for more info.\"\r\n ]\r\n}", + "logs": "{\r\n \"custom\": false,\r\n \"location\": \"logs\/latest.log\"\r\n}", + "stop": "stop" + }, + "scripts": { + "installation": { + "script": "#!\/bin\/ash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk update\r\napk add curl\r\n\r\nBASE_URL=${MODPACK_URL}\/files\r\n\r\nif [ -z \"${MODPACK_VERSION}\" ] || [ \"${MODPACK_VERSION}\" == \"latest\" ]; then\r\n ID=`curl -sl ${BASE_URL} | grep -i -A9 'title=\"release\"' | grep -m 1 -i -o 'href=\".*\"' | cut -d \"\/\" -f5 | sed s\/\\\"\/\/g`\r\n echo \"ID: ${ID}\"\r\nelse \r\n ID=`curl -sl ${BASE_URL} | grep -i -A9 \"${MODPACK_VERSION}\" | grep -m 1 -oE 'href=\"[^\\\"]+\"' | cut -d \"\/\" -f5 | grep -oE [0-9]+`\r\n echo \"ID: ${ID}\"\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\n\r\nSECONDURL=${BASE_URL}\/${ID}\r\necho \"SECONDURL: ${SECONDURL}\"\r\n\r\nGOOD_ID=`curl -sl ${SECONDURL} | grep -i server | grep -Eo 'href=\"[^\\\"]+\"' | grep -o -E \"[0-9]+\" | tail -1`\r\necho \"GOOD_ID: ${GOOD_ID}\"\r\n\r\nDL_URL=${BASE_URL}\/${GOOD_ID}\/download\r\necho \"Download_URL: ${DL_URL}\"\r\n\r\ncd \/mnt\/server\r\n\r\necho \"Executing curl -L ${DL_URL} -o server.zip\"\r\ncurl -L ${DL_URL} -o server.zip\r\n\r\nunzip server.zip\r\n\r\nrm -rf server.zip\r\n\r\necho -e \"\\nInstalling forge server usint the installer jar file.\\n\"\r\njava -jar *installer.jar --installServer\r\n\r\necho -e \"\\nDeleting installer jar file and cleaning up.\\n\"\r\nrm -rf *installer.jar\r\n\r\nmv *universal.jar server.jar", + "container": "frolvlad\/alpine-oraclejdk8:cleaned", + "entrypoint": "ash" + } + }, + "variables": [ + { + "name": "modpack URL", + "description": "The modpack URL from the curseforge site.\r\n\r\n(Ex. https:\/\/minecraft.curseforge.com\/projects\/sevtech-ages)", + "env_variable": "MODPACK_URL", + "default_value": "", + "user_viewable": 1, + "user_editable": 1, + "rules": "required|string|max:64" + }, + { + "name": "Modpack Version", + "description": "Version of the modpack to use.", + "env_variable": "MODPACK_VERSION", + "default_value": "latest", + "user_viewable": 1, + "user_editable": 1, + "rules": "required|string|max:20" + } + ] +} \ No newline at end of file