forked from pelican-eggs/games-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
egg-pterodactyl-tshock-legacy.json
72 lines (72 loc) · 4.12 KB
/
egg-pterodactyl-tshock-legacy.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-01T00:17:19+00:00",
"name": "tshock legacy",
"author": "[email protected]",
"description": "The t-shock modded terraria server.\r\n\r\nhttps://tshock.co/",
"features": null,
"docker_images": {
"mono": "ghcr.io/parkervcp/yolks:mono_latest"
},
"file_denylist": [],
"startup": "mono TerrariaServer.exe -ip 0.0.0.0 -port {{SERVER_PORT}} -maxplayers {{MAX_PLAYERS}} -world {{WORLD_NAME}}.wld -autocreate {{WORLD_SIZE}}",
"config": {
"files": "{}",
"logs": "{}",
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\"\r\n}",
"stop": "exit"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "/bin/bash",
"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\napt update\r\napt install -y curl wget jq file unzip\r\n\r\n\r\n## get release info and download links\r\nLATEST_JSON=$(curl --silent \"https://api.github.com/repos/Pryaxis/TShock/releases/latest\")\r\nRELEASES=$(curl --silent \"https://api.github.com/repos/Pryaxis/TShock/releases\")\r\n\r\nif [ -z \"$TSHOCK_VERSION\" ] || [ \"$TSHOCK_VERSION\" == \"latest\" ]; then\r\n DOWNLOAD_LINK=$(echo $LATEST_JSON | jq .assets | jq -r .[].browser_download_url)\r\nelse\r\n VERSION_CHECK=$(echo $RELEASES | jq -r --arg VERSION \"$TSHOCK_VERSION\" '.[] | select(.tag_name==$VERSION) | .tag_name')\r\n if [ \"$TSHOCK_VERSION\" == \"$VERSION_CHECK\" ]; then\r\n DOWNLOAD_LINK=$(echo $RELEASES | jq -r --arg VERSION \"$TSHOCK_VERSION\" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url')\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\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 -o ${DOWNLOAD_LINK##*/}\r\nelse\r\n echo -e \"unknown filetype. Exeting\"\r\n exit 2 \r\nfi\r\n\r\necho -e \"install complete\""
}
},
"variables": [
{
"name": "Max Players",
"description": "The maximum number of players a server will hold.",
"env_variable": "MAX_PLAYERS",
"default_value": "8",
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric|digits_between:1,3",
"field_type": "text"
},
{
"name": "World Size",
"description": "Defines the worlds size. 3 sizes 1 (small), 2 (medium), 3 (large).",
"env_variable": "WORLD_SIZE",
"default_value": "1",
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric|digits_between:1,3",
"field_type": "text"
},
{
"name": "World Name",
"description": "The name for the world file.",
"env_variable": "WORLD_NAME",
"default_value": "world",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20",
"field_type": "text"
},
{
"name": "Tshock Version",
"description": "The version on tshock that will be installed. \r\n\r\nLatest available is: v4.5.18!",
"env_variable": "TSHOCK_VERSION",
"default_value": "v4.5.18",
"user_viewable": true,
"user_editable": false,
"rules": "required|string|max:20",
"field_type": "text"
}
]
}