-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathegg-terraria.json
executable file
·62 lines (62 loc) · 3.02 KB
/
egg-terraria.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
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2022-12-24T07:24:18-04:00",
"name": "\u00bb TERRARIA",
"author": "[email protected]",
"description": "TERRARIA \u2014 AMD & ARM",
"features": null,
"docker_images": {
"ghcr.io\/daniscript18\/yolks:terraria": "ghcr.io\/daniscript18\/yolks:terraria"
},
"file_denylist": [],
"startup": ".\/start.sh {{START_FILE}} {{CONFIG_FILE}} 0.0.0.0 {{SERVER_PORT}} {{MAX_PLAYERS}}",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": \"Type 'help' for a list of commands\"\r\n}",
"logs": "{}",
"stop": "exit"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\napt update -y ; apt upgrade -y\r\napt install -y curl wget file unzip\r\n\r\nDOWNLOAD_LINK=$(curl -sSL https:\/\/terraria.gamepedia.com\/Server#Downloads | grep '>Terraria Server ' | grep -Eoi '<a [^>]+>' | grep -Eo 'href=\\\"[^\\\\\\\"]+\\\"' | grep -Eo '(http|https):\\\/\\\/[^\\\"]+' | tail -1 | cut -d'?' -f1)\r\n\r\nmkdir -p \/mnt\/server\/\r\nmkdir -p \/mnt\/server\/saves\/Worlds\r\n\r\ncd \/mnt\/server\/\r\n\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ];\r\nthen \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK};\r\n then\r\n return\r\n else\r\n exit 2\r\n fi\r\nfi\r\n\r\nCLEAN_VERSION=$(echo ${DOWNLOAD_LINK##*\/} | cut -d'-' -f3 | cut -d'.' -f1)\r\n\r\necho ${DOWNLOAD_LINK}\r\necho ${DOWNLOAD_LINK##*\/}\r\n\r\nwget \"${DOWNLOAD_LINK}\"\r\nunzip ${DOWNLOAD_LINK##*\/}\r\n\r\ncp -R ${CLEAN_VERSION}\/Linux\/* .\/\r\nchmod +x TerrariaServer.bin.x86_64\r\n\r\nrm -rf ${CLEAN_VERSION}\r\nrm -rf System*\r\nrm -rf Mono*\r\nrm -rf monoconfig\r\nrm -rf mscorlib.dll \r\n\r\nwget https:\/\/raw.githubusercontent.com\/daniscript18\/pterodactyl\/master\/yolks\/terraria\/serverconfig.txt",
"container": "ubuntu:latest",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "START_FILE",
"description": "",
"env_variable": "START_FILE",
"default_value": ".\/TerrariaServer.exe",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "CONFIG_FILE",
"description": "",
"env_variable": "CONFIG_FILE",
"default_value": ".\/serverconfig.txt",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "MAX_PLAYERS",
"description": "",
"env_variable": "MAX_PLAYERS",
"default_value": "16",
"user_viewable": true,
"user_editable": false,
"rules": "required|numeric|max:255",
"field_type": "text"
}
]
}