eggs/game_eggs/minecraft/java/ftb/egg-ftb-modpacksch-server.json

80 lines
5.9 KiB
JSON
Raw Normal View History

{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
2023-03-01 03:40:26 +08:00
"version": "PTDL_v2",
2021-06-15 02:39:37 +08:00
"update_url": null
},
2023-03-01 03:40:26 +08:00
"exported_at": "2023-02-28T14:35:03-05:00",
"name": "FTB-modpacks.ch Server",
"author": "runemaster580@gmail.com",
"description": "Since the release of the FTB APP, FTB modpacks are now distributed through modpacks.ch. This egg was developed for support for modpacks that are distributed through this.",
"features": [
"eula",
"java_version",
"pid_limit"
],
2023-03-01 03:40:26 +08:00
"docker_images": {
"Java 17": "ghcr.io\/pterodactyl\/yolks:java_17",
"Java 16": "ghcr.io\/pterodactyl\/yolks:java_16",
"Java 11": "ghcr.io\/pterodactyl\/yolks:java_11",
"Java 8": "ghcr.io\/pterodactyl\/yolks:java_8"
},
2021-06-15 02:39:37 +08:00
"file_denylist": [],
2023-03-01 03:40:26 +08:00
"startup": "java -javaagent:log4jfix\/Log4jPatcher-1.0.0.jar -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s \"-jar start-server.jar\" || printf %s \"@unix_args.txt\" )",
"config": {
2023-03-01 03:40:26 +08:00
"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": {
2023-03-01 03:40:26 +08:00
"script": "#!\/bin\/bash\r\n# FTB Pack Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n# Download needed software.\r\napt update\r\napt install -y curl jq\r\n\r\n\r\n# if no modpack id is set and modpack search term is set.\r\nif [ -z ${FTB_MODPACK_ID} ] && [ ! -z ${FTB_SEARCH_TERM} ]; then\r\n JSON_DATA=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/search\/8?term=${FTB_SEARCH_TERM})\r\n\r\n # grabs the first modpack in array.\r\n FTB_MODPACK_ID=$(echo -e ${JSON_DATA} | jq -r \".packs[]\")\r\nfi\r\n\r\nif [ -z ${FTB_MODPACK_VERSION_ID} ] && [ ! -z ${FTB_VERSION_STRING} ]; then\r\n # grabs the correct version id matching the string.\r\n FTB_MODPACK_VERSION_ID=$(curl -sSL https:\/\/api.modpacks.ch\/public\/modpack\/${FTB_MODPACK_ID} | jq -r --arg VSTRING ${FTB_VERSION_STRING} '.versions[] | select(.name == $VSTRING) | .id')\r\nfi\r\n\r\n# get architecture for installer\r\nINSTALLER_TYPE=$([ \"$(uname -m)\" == \"x86_64\" ] && echo \"linux\" || echo \"arm\/linux\")\r\n\r\necho \"ModpackID: ${FTB_MODPACK_ID} VersionID: ${FTB_MODPACK_VERSION_ID} InstallerType: ${INSTALLER_TYPE}\"\r\n\r\n# download installer\r\ncurl -L https:\/\/api.modpacks.ch\/public\/modpack\/0\/0\/server\/${INSTALLER_TYPE} --output serversetup\r\nchmod +x .\/serversetup\r\n\r\n\r\n# remove old forge files (to allow updating)\r\nrm -rf libraries\/net\/minecraftforge\/forge\r\nrm -f unix_args.txt\r\n\r\n# run installer\r\n.\/serversetup ${FTB_MODPACK_ID} ${FTB_MODPACK_VERSION_ID} --auto --noscript --nojava\r\n\r\n# create symlink for forge unix_args.txt if exists\r\nif compgen -G \"libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt\"; then\r\n ln -sf libraries\/net\/minecraftforge\/forge\/*\/unix_args.txt unix_args.txt\r\nfi\r\n\r\n# move forge\/fabric jar file to start-server.jar if exists\r\nif compgen -G \"forge-*.jar\"; then\r\n mv -f forge-*.jar start-server.jar\r\nelif compgen -G \"fabric-*.jar\"; then\r\n mv -f fabric-*.jar start-server.jar\r\nfi\r\n\r\n# installer cleanup\r\nrm serversetup\r\nrm -f run.bat\r\nrm -f run.sh\r\n\r\necho \"Finished installing FTB modpack\"",
"container": "openjdk:8-jdk-slim",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "FTB Pack search term",
"description": "the search term for finding the modpack. needs to be at least 4 characters long.\r\nFind out what term is needed by using the ftb app and searching with the term. make sure it only returns 1 result.\r\ncan also be searched for via: https:\/\/api.modpacks.ch\/public\/modpack\/search\/8?term={SEARCHTERM}\r\n\r\nonly needed if the modpack id and modpack version id is unknown.",
"env_variable": "FTB_SEARCH_TERM",
"default_value": "",
2021-06-15 02:39:37 +08:00
"user_viewable": true,
"user_editable": true,
2023-03-01 03:40:26 +08:00
"rules": "nullable|string|max:99|min:4",
"field_type": "text"
},
{
"name": "FTB modpack ID",
"description": "The FTB Api modpack ID.\r\nNeeded if not using the search variable\r\n\r\nExample: FTB Interactions ID is 5.\r\nhttps:\/\/api.modpacks.ch\/public\/modpack\/5",
"env_variable": "FTB_MODPACK_ID",
"default_value": "",
2021-06-15 02:39:37 +08:00
"user_viewable": true,
"user_editable": true,
2023-03-01 03:40:26 +08:00
"rules": "nullable|integer|min:1",
"field_type": "text"
},
{
"name": "FTB Pack Version",
"description": "what version of the modpack to install. leave empty if using the modpack version id variable.",
"env_variable": "FTB_VERSION_STRING",
"default_value": "",
2021-06-15 02:39:37 +08:00
"user_viewable": true,
"user_editable": true,
2023-03-01 03:40:26 +08:00
"rules": "nullable|string|max:20",
"field_type": "text"
},
{
"name": "FTB Pack Version ID",
"description": "The modpack api version ID.\r\nneeded if not using the string for the version.\r\n\r\nExample FTB Revelations version id for version \"2.0.2\" is 86.\r\nwhich would come out as: https:\/\/api.modpacks.ch\/public\/modpack\/5\/86",
"env_variable": "FTB_MODPACK_VERSION_ID",
"default_value": "",
2021-06-15 02:39:37 +08:00
"user_viewable": true,
"user_editable": true,
2023-03-01 03:40:26 +08:00
"rules": "nullable|integer|min:1",
"field_type": "text"
}
]
}