eggs/among_us_impostor_server/egg-among-us--impostor-server.json
2020-10-11 07:18:41 +02:00

54 lines
4.6 KiB
JSON

{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1"
},
"exported_at": "2020-10-11T07:18:29+02:00",
"name": "Among Us - Impostor Server",
"author": "info@goover.de",
"description": "Impostor is one of the first Among Us private servers, written in C#.\r\n\r\nThe latest version supported is 2020.9.22, both desktop and mobile.\r\n\r\nThere are no special features at this moment, the goal is aiming to be as close as possible to the real server, for now. In a later stage, making modifications to game logic by modifying GameData packets can be looked at.",
"image": "quay.io\/parkervcp\/pterodactyl-images:debian_dotnet",
"startup": ".\/Impostor.Server",
"config": {
"files": "{\r\n \"config.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"Server.PublicIp\":\"{{server.build.env.SERVER_IP}}\",\r\n \"Server.PublicPort\": \"{{server.build.default.port}}\",\r\n \"Server.ListenPort\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"Matchmaker is listening on\",\r\n \"userInteraction\": []\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n\r\napt -y update\r\napt -y upgrade\r\napt -y --no-install-recommends install wget curl jq unzip tar redis-server file ca-certificates apt-utils\r\n\r\nexport HOME=\/mnt\/server\r\ncd $HOME\r\n\r\n## this is a simple script to use the github API for release versions.\r\n## this requires the egg has a variable for GITHUB_PACKAGE, VERSION and MATCH (match is to match the filename in some way)\r\n## this supports using oauth\/personal access tokens via GITHUB_USER and GITHUB_OAUTH_TOKEN (both are required.)\r\n## if you are getting hit with GitHub API limit issues then you need to have the user and token set.\r\n\r\nif [ -z \"${GITHUB_USER}\" ] && [ -z \"${GITHUB_OAUTH_TOKEN}\" ] ; then\r\n echo -e \"[INFO] using anononym API Call\"\r\nelse\r\n echo -e \"[INFO] User and OAuth Token set\"\r\n alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '\r\nfi\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/${GITHUB_PACKAGE}\/releases\")\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\nif [ ! -z \"${DOWNLOAD_URL}\"]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_URL}; then\r\n echo -e \"link is valid. setting download link to ${DOWNLOAD_URL}\"\r\n DOWNLOAD_LINK=${DOWNLOAD_URL}\r\n else \r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\necho $DOWNLOAD_LINK\r\nwget $DOWNLOAD_LINK\r\nunzip Impostor-Server-linux-x64.zip\r\nrm -fR Impostor-Server-linux-x64.zip \r\nchmod +x Impostor.Server",
"container": "debian:buster-slim",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "GITHUB_PACKAGE",
"description": "GITHUB_PACKAGE",
"env_variable": "GITHUB_PACKAGE",
"default_value": "AeonLucid\/Impostor",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20"
},
{
"name": "VERSION",
"description": "VERSION",
"env_variable": "VERSION",
"default_value": "latest",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:20"
},
{
"name": "MATCH",
"description": "MATCH",
"env_variable": "MATCH",
"default_value": "Impostor-Server-linux-x64.zip",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:40"
}
]
}