"_comment":"DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta":{
"version":"PTDL_v1"
},
"exported_at":"2020-07-15T18:19:27-04: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.",
"script":"#!\/bin\/bash\r\n# FTB Pack Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir -p \/mnt\/server\r\nfi\r\n\r\n# Download needed software.\r\nfunction install_required {\r\n apt update\r\n apt install -y curl jq dos2unix\r\n}\r\n\r\n\r\nfunction get_download {\r\n # if no modpack id is set and modpack search term is set.\r\n if [ -z ${FTB_MODPACK_ID} ] && [ \"${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\n fi\r\n \r\n if [ -z ${FTB_MODPACK_VERSION_ID} ] && [ \"${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\n fi\r\n \r\n echo -e \"ID: ${FTB_MODPACK_ID} VersionID: ${FTB_MODPACK_VERSION_ID}\"\r\n \r\n cd \/mnt\/server\r\n \r\n curl https:\/\/api.modpacks.ch\/public\/modpack\/${FTB_MODPACK_ID}\/${FTB_MODPACK_VERSION_ID}\/server\/linux --output serversetup\r\n chmod +x .\/serversetup\r\n .\/serversetup ${FTB_MODPACK_ID} ${FTB_MODPACK_VERSION_ID} <<< 'y'\r\n}\r\n\r\nfunction cleanup {\r\n rm -rf serversetup\r\n mv forge-*.jar forge-server.jar\r\n}\r\n\r\ninstall_required\r\nget_download\r\ncleanup",
"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":"",
"user_viewable":1,
"user_editable":1,
"rules":"nullable|string|max:99|min:4"
},
{
"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":"",
"user_viewable":1,
"user_editable":1,
"rules":"nullable|string|max:20"
},
{
"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":"",
"user_viewable":1,
"user_editable":1,
"rules":"nullable|string|max:20"
},
{
"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",