eggs/game_eggs/minecraft/bedrock/pocketmine_mp/egg-pocketmine-m-p.json
Michael (Parker) Parker b6166ac627
remove pm5 support
2023-02-11 22:30:46 -05:00

42 lines
4.9 KiB
JSON

{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2023-02-11T22:30:05-05:00",
"name": "PocketmineMP",
"author": "info@swisscrafting.ch",
"description": "Pocketmine Egg\r\nby onekintaro from swisscrafting.ch\r\nwith the nice help from #eggs Channel on Pterodactyl-Discord :)",
"features": null,
"docker_images": {
"ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian"
},
"file_denylist": [],
"startup": ".\/bin\/php7\/bin\/php .\/PocketMine-MP.phar --no-wizard --disable-ansi",
"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}",
"logs": "{}",
"stop": "stop"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\napt update\r\napt install -y git curl wget jq file tar unzip zip\r\n\r\nif [[ ! -f \/mnt\/server ]]; then\r\n mkdir \/mnt\/server\/\r\nfi\r\n\r\ncd \/mnt\/server\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\")\r\n\r\n# Restrict versions to latest pm4 and pm5 for now.\r\nif [[ \"${VERSION}\" == \"pm4\" ]] || [[ \"${VERSION}\" == \"\" ]]; then\r\n DOWNLOAD_LINK=$(curl -ssL https:\/\/update.pmmp.io\/api?channel=stable | grep 'download_url' | cut -d '\"' -f 4)\r\n PHP_URL=$(curl --silent \"https:\/\/api.github.com\/repos\/pmmp\/PHP-Binaries\/releases\/latest\" | jq .assets | jq -r .[].browser_download_url | grep -iE 'Linux' | grep PM4)\r\n echo -e \"Downloading latest PocketMine 4 from ${DOWNLOAD_LINK}\"\r\n curl -ssL \"${DOWNLOAD_LINK}\" -o PocketMine-MP.phar\r\n# elif [[ \"${VERSION}\" == \"pm5\" ]]; then\r\n# DOWNLOAD_LINK=$(curl -ssL https:\/\/update.pmmp.io\/api?channel=pm5 | grep 'download_url' | cut -d '\"' -f 4)\r\n# PHP_URL=$(curl --silent \"https:\/\/api.github.com\/repos\/pmmp\/PHP-Binaries\/releases\/latest\" | jq .assets | jq -r .[].browser_download_url | grep -iE 'Linux' | grep PM5)\r\n# echo -e \"Downloading latest PocketMine 5 from ${DOWNLOAD_LINK}\"\r\n# curl -ssL \"${DOWNLOAD_LINK}\" -o PocketMine-MP.phar\r\nelse\r\n echo -e \"Unknown version ${VERSION}\"\r\n exit 1\r\nfi\r\n\r\nif [[ \"${ARCH}\" == \"amd64\" ]]; then\r\necho -e \"\\n downloading latest php build from PocketMine ${PHP_URL}\"\r\ncurl -sSL -o php.binary.tar.gz ${PHP_URL}\r\n\r\necho -e \"\\n unpacking php binaries\"\r\ntar -xzvf php.binary.tar.gz\r\n\r\necho -e \"\\n removing php packages\"\r\nrm -rf \/mnt\/server\/php.binary.tar.gz\r\n\r\necho -e \"\\n configuring PHP extensions library directory\"\r\nEXTENSION_DIR=$(find \"bin\" -name *debug-zts*)\r\ngrep -q '^extension_dir' bin\/php7\/bin\/php.ini && sed -i'bak' \"s{^extension_dir=.*{extension_dir=\\\"$EXTENSION_DIR\\\"{\" bin\/php7\/bin\/php.ini || echo \"extension_dir=\\\"$EXTENSION_DIR\\\"\" >>bin\/php7\/bin\/php.ini\r\nelse\r\napt install -y libtool-bin libtool make autoconf automake m4 gzip bzip2 bison g++ git cmake pkg-config re2c\r\n\r\nwget https:\/\/raw.githubusercontent.com\/pmmp\/php-build-scripts\/stable\/compile.sh -O compile.sh \r\nchmod +x compile.sh\r\n\r\necho \"please wait, this will take some time\"\r\n.\/compile.sh\r\nrm compile.sh\r\nrm -rf install_data\/\r\n\r\necho -e \"\\n configuring PHP extensions library directory\"\r\nEXTENSION_DIR=$(find \"bin\" -name *debug-zts*)\r\ngrep -q '^extension_dir' bin\/php7\/bin\/php.ini && sed -i'bak' \"s{^extension_dir=.*{extension_dir=\\\"$EXTENSION_DIR\\\"{\" bin\/php7\/bin\/php.ini || echo \"extension_dir=\\\"$EXTENSION_DIR\\\"\" >>bin\/php7\/bin\/php.ini\r\n\r\nfi\r\n\r\nif [[ ! -f server.properties ]]; then\r\n echo -e \"\\n downloading default server.properties\"\r\n curl -sSL https:\/\/raw.githubusercontent.com\/parkervcp\/eggs\/master\/game_eggs\/minecraft\/bedrock\/pocketmine_mp\/server.properties >server.properties\r\nfi\r\n\r\necho -e \"\\n creating files and folders\"\r\ntouch banned-ips.txt banned-players.txt ops.txt white-list.txt server.log\r\nmkdir -p players worlds plugins resource_packs\r\n\r\necho -e \"\\n\\nInstall script completed. Enjoy!\"",
"container": "ghcr.io\/pterodactyl\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Version to install [pm3 or pm4]",
"description": "Latest PocketMine version to install.",
"env_variable": "VERSION",
"default_value": "pm4",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:pm4",
"field_type": "text"
}
]
}