Added FTB-modpacks.ch egg
Added an egg to pull newer FTB packs from modpacks.ch.
This commit is contained in:
		
							parent
							
								
									b8f18c411c
								
							
						
					
					
						commit
						83139adb6f
					
				@ -30,6 +30,29 @@ Supply values to 2 variables to use
 | 
				
			|||||||
- MODPACK_URL:  from the url to the pack https://www.feed-the-beast.com/projects/{MODPACK_URL}  
 | 
					- MODPACK_URL:  from the url to the pack https://www.feed-the-beast.com/projects/{MODPACK_URL}  
 | 
				
			||||||
- MODPACK_VERSION: version of the modpack to install
 | 
					- MODPACK_VERSION: version of the modpack to install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[FTB Modpacks through modpacks.ch](https://api.modpacks.ch)
 | 
				
			||||||
 | 
					A generic service to pull FTB modpacks from api.modpacks.ch.
 | 
				
			||||||
 | 
					There are 2 ways to install a server through this service.
 | 
				
			||||||
 | 
					The first method only requires you to know the modpacks name and version.
 | 
				
			||||||
 | 
					The second method requires you to know the id for both the modpack and version in the api.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Method 1 (Recommended)**
 | 
				
			||||||
 | 
					- FTB_SEARCH_TERM: the modpack name to query for, must be at least 4 characters long.
 | 
				
			||||||
 | 
					  EX: for FTB: Interactions you would do "interactions".
 | 
				
			||||||
 | 
					- FTB_VERSION_STRING: the string version that you want to install.
 | 
				
			||||||
 | 
					  EX: for FTB: Interactions 2.0.2, you would put "2.0.2".
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					**Method 2**
 | 
				
			||||||
 | 
					- FTB_MODPACK_ID: the id that directs to the modpack in the api.
 | 
				
			||||||
 | 
					  EX: for FTB: Interactions the id would be "5". https://api.modpacks.ch/public/modpack/5
 | 
				
			||||||
 | 
					- FTB_MODPACK_VERSION_ID: the version id in the api.
 | 
				
			||||||
 | 
					  EX: for FTB: Interactions 2.0.2 the id is "86". https://api.modpacks.ch/public/modpack/5/86
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**NOTE**
 | 
				
			||||||
 | 
					**Not all FTB packs come with a server.properties file, due to this the server.properties file
 | 
				
			||||||
 | 
					may not get updated with the correct ip address and port at first launch.
 | 
				
			||||||
 | 
					Please restart the server after first launch to fix this.**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[FTB Revelation](https://www.feed-the-beast.com/projects/ftb-revelation)  
 | 
					[FTB Revelation](https://www.feed-the-beast.com/projects/ftb-revelation)  
 | 
				
			||||||
Revelation is a general all-purpose modpack with optimal FPS, server performance and stability.  
 | 
					Revelation is a general all-purpose modpack with optimal FPS, server performance and stability.  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -0,0 +1,63 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "_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.",
 | 
				
			||||||
 | 
					    "image": "quay.io\/pterodactyl\/core:java",
 | 
				
			||||||
 | 
					    "startup": "java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar forge-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\/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",
 | 
				
			||||||
 | 
					            "env_variable": "FTB_MODPACK_VERSION_ID",
 | 
				
			||||||
 | 
					            "default_value": "",
 | 
				
			||||||
 | 
					            "user_viewable": 1,
 | 
				
			||||||
 | 
					            "user_editable": 1,
 | 
				
			||||||
 | 
					            "rules": "nullable|string|max:20"
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user