remove forge enhanced and update forge generic

This commit is contained in:
Michael (Parker) Parker 2019-03-24 23:35:38 -04:00
parent dc3d03316d
commit 1c4539577f
2 changed files with 3 additions and 48 deletions

View File

@ -1,45 +0,0 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2019-02-10T22:57:27+01:00",
"name": "Forge Enhanced",
"author": "parker@parkervcp.com",
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
"image": "quay.io\/pterodactyl\/core:java",
"startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}",
"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\/bash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Fetching version\r\nif [ -z \"$MC_VERSION\" ] || [ \"$MC_VERSION\" == \"latest\" ]; then\r\n echo \"Fetching latest\"\r\n MC_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1].[0-9]*.[0-9]* - [0-9]*.[0-9]*.[0-9]*.[0-9]*' | sed 's\/ \/\/g')\r\nelif [[ ! \"$MC_VERSION\" =~ - ]]; then\r\n echo \"Fetching latest from version $MC_VERSION\"\r\n MC_VERSION=$(curl -sl https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/index_$MC_VERSION.html | grep -A 2 \"Latest\" | awk NF=NF RS= OFS=\" \" | grep -o -e '[1].[0-9]*.[0-9]* - [0-9]*.[0-9]*.[0-9]*.[0-9]*' | sed 's\/ \/\/g')\r\nfi\r\n\r\n#Checking if forge version valid\r\nif [[ ! \"$MC_VERSION\" =~ [1].[0-9]*.[0-9]*-[0-9]*.[0-9]*.[0-9]*.[0-9]* ]]; then\r\n echo \"!!! Invalid forge version \\\"$MC_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Go into main direction\r\ncd \/mnt\/server\r\n\r\n#Adding .jar when not eding by SERVER_JARFILE\r\nif [[ ! $SERVER_JARFILE = *\\.jar ]]; then\r\n SERVER_JARFILE=\"$SERVER_JARFILE.jar\"\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Downloading forge version \\\"$MC_VERSION\\\"\"\r\ncurl -o installer.jar -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-installer.jar\r\ncurl -o $SERVER_JARFILE -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$MC_VERSION\/forge-$MC_VERSION-universal.jar\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/installer.jar ] || [ ! -f .\/$SERVER_JARFILE ]; then\r\n echo \"!!! Error by downloading forge version \\\"$MC_VERSION\\\" !!!\"\r\n exit\r\nfi\r\n\r\n#Installing server\r\necho -e \"Installing forge server.\\n\"\r\njava -jar installer.jar --installServer\r\n\r\n#Deleting installer.jar\r\necho -e \"Deleting installer.jar file.\\n\"\r\nrm -rf installer.jar",
"container": "openjdk:8",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Server Jar File",
"description": "The name of the Jarfile to use when running Forge Mod.",
"env_variable": "SERVER_JARFILE",
"default_value": "server.jar",
"user_viewable": 1,
"user_editable": 1,
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/"
},
{
"name": "Forge version",
"description": "The version of forge that you want to run.\r\nExamples:\r\n- 1.12.2\r\n- 1.12.2-14.23.5.2810",
"env_variable": "MC_VERSION",
"default_value": "latest",
"user_viewable": 1,
"user_editable": 1,
"rules": "required|string|max:22"
}
]
}

View File

@ -3,7 +3,7 @@
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2018-07-15T12:35:48-04:00",
"exported_at": "2019-03-24T23:33:30-04:00",
"name": "Forge Generic",
"author": "parker@parkervcp.com",
"description": "A generic egg for a forge modpack",
@ -17,7 +17,7 @@
},
"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",
"script": "#!\/bin\/ash\r\n# Forge Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nfunction install_required {\r\n apk --no-cache --update add curl jq\r\n}\r\n\r\nfunction get_download {\r\n BASE_URL=${MODPACK_URL}\/files\r\n\r\n if [ -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\n else\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\n fi\r\n\r\n SECONDURL=${BASE_URL}\/${ID}\r\n echo \"SECONDURL: ${SECONDURL}\"\r\n\r\n GOOD_ID=`curl -sl ${SECONDURL} | grep -i server | grep -Eo 'href=\"[^\\\"]+\"' | grep -o -E \"[0-9]+\" | tail -1`\r\n if [ -z \"$GOOD_ID\" ]; then\r\n GOOD_ID=$ID\r\n fi\r\n echo \"GOOD_ID: ${GOOD_ID}\"\r\n\r\n DL_URL=${BASE_URL}\/${GOOD_ID}\/download\r\n echo \"Download_URL: ${DL_URL}\"\r\n\r\n cd \/mnt\/server\r\n\r\n echo \"Executing curl -L ${DL_URL} -o server.zip\"\r\n curl -L ${DL_URL} -o server.zip\r\n\r\n unzip server.zip\r\n\r\n rm -rf server.zip\r\n}\r\n\r\nfunction forge_install {\r\n echo -e \"\\nInstalling forge server using the installer jar file.\\n\"\r\n java -jar *installer.jar --installServer\r\n}\r\n\r\nfunction forge_cleanup {\r\n echo -e \"\\nDeleting installer jar file and cleaning up.\\n\"\r\n rm -rf *installer.jar\r\n\r\n mv *universal.jar server.jar\r\n}\r\n\r\nfunction json_download_prework {\r\n mkdir -p \/mnt\/server\/mods\r\n cd \/mnt\/server\/mods\r\n}\r\n\r\nfunction json_download_mods {\r\n MANIFEST=\/mnt\/server\/manifest.json\r\n for mod in $(jq -c '.files[]' ${MANIFEST} ); do\r\n projID=$(echo $mod | jq -r \".projectID\")\r\n fileID=$(echo $mod | jq -r \".fileID\")\r\n URL=\"https:\/\/minecraft.curseforge.com\/projects\/${projID}\/files\/${fileID}\/download\"\r\n echo \"mods file url: ${URL}\"\r\n # this is saving everything as \/mnt\/server\/mods\/download\r\n FINAL_URL=$(curl $URL -s -L -o \/dev\/null -w '%{url_effective}')\r\n echo \"Mod direct url: $FINAL_URL\"\r\n curl -JLO ${FINAL_URL}\r\n done\r\n}\r\n\r\nfunction json_download_forge {\r\n cd \/mnt\/server\r\n FORGE=$(jq -r '.minecraft.modLoaders[0].id' \/mnt\/server\/manifest.json | cut -d '-' -f2)\r\n MCVER=$(jq -r '.minecraft.version' \/mnt\/server\/manifest.json)\r\n\tif [ ${MCVER} == \"1.7.10\" ] || [ ${MCVER} == \"1.8.9\" ]; then\r\n\t\tFORGE=\"${FORGE}-${MCVER}\"\r\n\tfi\r\n FORGE_VERSION=\"${MCVER}-${FORGE}\"\r\n \r\n echo -e \"\\nDownloading Forge Version $FORGE_VERSION\\n\"\r\n echo -r \"running curl -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$FORGE_VERSION\/forge-$FORGE_VERSION-installer.jar -o installer.jar \\n\"\r\n curl -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$FORGE_VERSION\/forge-$FORGE_VERSION-installer.jar -o installer.jar\r\n echo -r \"running curl -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$FORGE_VERSION\/forge-$FORGE_VERSION-universal.jar -O \\n\"\r\n curl -sS https:\/\/files.minecraftforge.net\/maven\/net\/minecraftforge\/forge\/$FORGE_VERSION\/forge-$FORGE_VERSION-universal.jar -O\r\n java -jar installer.jar --installServer\r\n mv *universal.jar server.jar\r\n rm installer.jar\r\n}\r\n\r\nfunction json_download_overrides {\r\n if [ -d \/mnt\/server\/overrides ]; then\r\n mv \/mnt\/server\/overrides\/mods\/* \/mnt\/server\/mods\/\r\n rmdir \/mnt\/server\/overrides\/mods\r\n mv \/mnt\/server\/overrides\/* \/mnt\/server\r\n rmdir \/mnt\/server\/overrides\r\n fi\r\n}\r\n\r\ninstall_required\r\nget_download\r\nif [ -f \/mnt\/server\/manifest.json ]; then\r\n json_download_prework\r\n json_download_mods\r\n json_download_overrides\r\n json_download_forge\r\nelse\r\n forge_install\r\n forge_cleanup\r\nfi",
"container": "openjdk:8-alpine",
"entrypoint": "ash"
}
@ -30,7 +30,7 @@
"default_value": "",
"user_viewable": 1,
"user_editable": 1,
"rules": "required|string|max:64"
"rules": "required|string"
},
{
"name": "Modpack Version",