mirror of
https://github.com/pelican-eggs/games-standalone.git
synced 2024-11-22 18:32:30 +01:00
Merge pull request #343 from parkervcp/update/tmodloader
update tModLoader install script
This commit is contained in:
commit
88d6563644
@ -3,12 +3,12 @@
|
|||||||
"meta": {
|
"meta": {
|
||||||
"version": "PTDL_v1"
|
"version": "PTDL_v1"
|
||||||
},
|
},
|
||||||
"exported_at": "2018-10-07T10:01:51-04:00",
|
"exported_at": "2019-10-30T21:46:07-04:00",
|
||||||
"name": "tModloader",
|
"name": "tModloader",
|
||||||
"author": "parker@parkervcp.com",
|
"author": "parker@parkervcp.com",
|
||||||
"description": "tModLoader is essentially a mod that provides a way to load your own mods without having to work directly with Terraria's source code itself. This means you can easily make mods that are compatible with other people's mods, save yourself the trouble of having to decompile and recompile Terraria.exe, and escape from having to understand all of the obscure \"intricacies\" of Terraria's source code. It is made to work for Terraria 1.3+.",
|
"description": "tModLoader is essentially a mod that provides a way to load your own mods without having to work directly with Terraria's source code itself. This means you can easily make mods that are compatible with other people's mods, save yourself the trouble of having to decompile and recompile Terraria.exe, and escape from having to understand all of the obscure \"intricacies\" of Terraria's source code. It is made to work for Terraria 1.3+.",
|
||||||
"image": "quay.io\/parkervcp\/pterodactyl-images:ubuntu",
|
"image": "quay.io\/parkervcp\/pterodactyl-images:base_ubuntu",
|
||||||
"startup": ".\/tModLoaderServer.bin.x86_64 -ip 0.0.0.0 -port ${SERVER_PORT} -maxplayers ${MAX_PLAYERS} -world ~\/saves\/Worlds\/${WORLD_NAME}.wld -worldname ${WORLD_NAME} -autocreate ${WORLD_SIZE} -savedirectory ~\/ -tmlsavedirectory ~\/saves -modpath ~\/mods",
|
"startup": ".\/TerrariaServer.bin.x86_64 -ip 0.0.0.0 -port ${SERVER_PORT} -maxplayers ${MAX_PLAYERS} -world ~\/saves\/Worlds\/${WORLD_NAME}.wld -worldname ${WORLD_NAME} -autocreate ${WORLD_SIZE} -savedirectory ~\/ -tmlsavedirectory ~\/saves -modpath ~\/mods",
|
||||||
"config": {
|
"config": {
|
||||||
"files": "{}",
|
"files": "{}",
|
||||||
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\",\r\n \"userInteraction\": []\r\n}",
|
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\",\r\n \"userInteraction\": []\r\n}",
|
||||||
@ -17,8 +17,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"installation": {
|
"installation": {
|
||||||
"script": "#!\/bin\/ash\r\n# Vanilla T-shock Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\ncd \/mnt\/server\r\n\r\necho -e \"Downloading tModloader\"\r\nwget https:\/\/github.com\/blushiemagic\/tModLoader\/releases\/download\/${TMODLOADER_VERSION}\/tModLoader.Linux.${TMODLOADER_VERSION}.zip\r\n\r\necho -e \"Unpacking mod loader files\"\r\nunzip tModLoader.Linux.${TMODLOADER_VERSION}.zip\r\n\r\nCLEAN_VERSION=$(echo ${TERRARIA_VERSION} | sed 's\/\\.\/\/g')\r\n\r\necho -e \"Downloading terraria server files\"\r\nwget http:\/\/terraria.org\/server\/terraria-server-${CLEAN_VERSION}.zip\r\n\r\necho -e \"Unpacking server files\"\r\nunzip terraria-server-$(echo ${CLEAN_VERSION} | sed 's\/\\.\/\/g').zip\r\ncp -R ${CLEAN_VERSION}\/Linux\/* .\/\r\n\r\necho -e \"Cleaning up extra files.\"\r\nrm -rf ${CLEAN_VERSION}\r\n\r\nchmod +x .\/tModLoaderServer.bin.x86_64",
|
"script": "#!\/bin\/bash\r\n# Vanilla tModloader Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n## install packages to get version and download links\r\napk add --no-cache curl wget jq file unzip\r\n\r\nif [ -z \"$GITHUB_USER\" ] && [ -z \"$GITHUB_OAUTH_TOKEN\" ] ; then\r\n echo -e \"using anon api call\"\r\nelse\r\n echo -e \"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 linux)\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 linux)\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 | grep -i linux)\r\n fi\r\nfi\r\n\r\n## clean terraria version\r\nCLEAN_VERSION=$(echo ${TERRARIA_VERSION} | sed 's\/\\.\/\/g')\r\n\r\n## mkdir and cd to \/mnt\/server\/\r\nmkdir -p \/mnt\/server\r\n\r\ncd \/mnt\/server\r\n\r\n## download release\r\necho -e \"running: wget $DOWNLOAD_LINK\"\r\nwget $DOWNLOAD_LINK\r\n\r\nFILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\nif [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\nelif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${DOWNLOAD_LINK##*\/}\r\nelse\r\n echo -e \"unknown filetype. Exeting\"\r\n exit 2 \r\nfi\r\n\r\necho -e \"Downloading terraria server files\"\r\nwget http:\/\/terraria.org\/server\/terraria-server-${CLEAN_VERSION}.zip\r\n\r\necho -e \"Unpacking server files\"\r\nunzip terraria-server-$(echo ${CLEAN_VERSION} | sed 's\/\\.\/\/g').zip\r\ncp -R ${CLEAN_VERSION}\/Linux\/* .\/\r\n\r\nchmod +x TerrariaServer.bin.x86_64\r\n\r\necho -e \"Cleaning up extra files.\"\r\nrm -rf ${CLEAN_VERSION}",
|
||||||
"container": "alpine:3.9",
|
"container": "alpine:3.10",
|
||||||
"entrypoint": "ash"
|
"entrypoint": "ash"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -26,8 +26,8 @@
|
|||||||
{
|
{
|
||||||
"name": "tModloader Version",
|
"name": "tModloader Version",
|
||||||
"description": "The version of tModloader that is to be used.",
|
"description": "The version of tModloader that is to be used.",
|
||||||
"env_variable": "TMODLOADER_VERSION",
|
"env_variable": "VERSION",
|
||||||
"default_value": "v0.10.1.5",
|
"default_value": "latest",
|
||||||
"user_viewable": 1,
|
"user_viewable": 1,
|
||||||
"user_editable": 1,
|
"user_editable": 1,
|
||||||
"rules": "required|string|max:20"
|
"rules": "required|string|max:20"
|
||||||
@ -67,6 +67,33 @@
|
|||||||
"user_viewable": 1,
|
"user_viewable": 1,
|
||||||
"user_editable": 1,
|
"user_editable": 1,
|
||||||
"rules": "required|numeric|digits_between:1,3"
|
"rules": "required|numeric|digits_between:1,3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub User",
|
||||||
|
"description": "GitHub user to use for api calls.\r\n\r\nThis only needs to be set if you hit the GitHub API too often across multiple servers.",
|
||||||
|
"env_variable": "GITHUB_USER",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": 0,
|
||||||
|
"user_editable": 0,
|
||||||
|
"rules": "string|nullable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub OAuth Token",
|
||||||
|
"description": "This can be either an OAuth or a Personal Access Token.\r\n\r\nThis is required for the install is you set a user.",
|
||||||
|
"env_variable": "GITHUB_OAUTH_TOKEN",
|
||||||
|
"default_value": "",
|
||||||
|
"user_viewable": 0,
|
||||||
|
"user_editable": 0,
|
||||||
|
"rules": "string|nullable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub Package",
|
||||||
|
"description": "This is to make automating this kind of thing easier.\r\n\r\nDo not edit if you don't know what you are doing.",
|
||||||
|
"env_variable": "GITHUB_PACKAGE",
|
||||||
|
"default_value": "tModLoader\/tModLoader",
|
||||||
|
"user_viewable": 0,
|
||||||
|
"user_editable": 0,
|
||||||
|
"rules": "required|string"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user