add tachyon

This commit is contained in:
Alex 2021-02-03 22:58:46 -08:00
parent 714389e439
commit 60bf986f22
2 changed files with 45 additions and 0 deletions

14
ftl/tachyon/README.MD Normal file
View File

@ -0,0 +1,14 @@
# Mohist
Tachyon is a multiplayer FTL server and client.
## Server Ports
The Tachyon server requires a single port for access
| Port | default |
|-------|---------|
| Game | 30303 |
## Server Specific
The client can be found at https://spektor.itch.io/tachyon

View File

@ -0,0 +1,31 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2021-02-03T22:58:07-08:00",
"name": "Tachyon",
"author": "alex.chang-lam@protonmail.com",
"description": "A multiplayer version of FTL.",
"features": null,
"images": [
"quay.io\/pterodactyl\/core:java"
],
"file_denylist": "",
"startup": ".\/tachyon\/server\/StartServerConsole.sh",
"config": {
"files": "{}",
"startup": "{}",
"logs": "{}",
"stop": "exit"
},
"scripts": {
"installation": {
"script": "#! \/bin\/bash\r\n\r\nGITHUB_PACKAGE=Dav-Edward\/TachyonsCE\r\nMATCH=TachyonsCE\r\n\r\napt update\r\napt install -y curl jq file unzip\r\n\r\nif [ ! -d \/mnt\/server\/ ]; then\r\n mkdir -p \/mnt\/server\/\r\nfi\r\n\r\ncd \/mnt\/server\/\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 [ \"$(echo ${LATEST_JSON} | jq -r '.message')\" != \"Not Found\" ] && [[ -z \"${VERSION}\" || \"${VERSION}\" == \"latest\" ]]; then\r\n echo -e \"grabbing latest version\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})\r\nelif [ \"$(echo ${LATEST_JSON} | jq -r '.message')\" == \"Not Found\" ]; then\r\n ## emergency fallback if latest isn't found\r\n ## grabs the latest release even it it's a pre-release\r\n echo -e \"grabbing latest pre-release\"\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r '.[0].assets[].browser_download_url' | grep -i ${MATCH})\r\nelse\r\n echo -e \"grabbing version $VERSION\"\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_URL=$(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_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)\r\n fi\r\nfi\r\n\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 VALIDATED_URL=${DOWNLOAD_URL}\r\n else \r\n echo -e \"link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncurl -sSL -o ${VALIDATED_URL##*\/} ${VALIDATED_URL}\r\n\r\nFILETYPE=$(file -F ',' ${VALIDATED_URL##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${VALIDATED_URL##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${VALIDATED_URL##*\/}\r\nelif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${VALIDATED_URL##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exiting\"\r\n # exit 2 \r\nfi\r\n\r\n#pull version and format folder name for renaming\r\nFOLDER=$(echo ${LATEST_JSON} | jq .tag_name | tr -d 'v\"')\r\n\r\n#move all files out\r\ncd .\/TachyonsCE_${FOLDER}\r\ncp -r * \/mnt\/server\r\n\r\ncd \/mnt\/server\r\nrm -rf TachyonsCE_${FOLDER}\r\nrm ${VALIDATED_URL##*\/}",
"container": "debian:buster-slim",
"entrypoint": "bash"
}
},
"variables": []
}