-
Notifications
You must be signed in to change notification settings - Fork 48
/
egg-pterodactyl-american-truck-simulator-dedicated-server.json
84 lines (84 loc) · 6.65 KB
/
egg-pterodactyl-american-truck-simulator-dedicated-server.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
73
74
75
76
77
78
79
80
81
82
83
84
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PANEL",
"meta": {
"update_url": null,
"version": "PTDL_v2"
},
"exported_at": "2024-06-01T00:03:47+00:00",
"name": "American Truck Simulator Dedicated Server",
"author": "chase@cstmgames.com",
"description": "This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local/share/American Truck Simulator/ folder and select start. Make sure that auto start is off on server creation to allow you to upload your config files.",
"features": [
"steam_disk_space"
],
"docker_images": {
"ghcr.io/parkervcp/steamcmd:debian": "ghcr.io/parkervcp/steamcmd:debian"
},
"file_denylist": [],
"startup": "./bin/linux_x64/amtrucks_server",
"config": {
"files": "{\r\n \"/.local/share/American Truck Simulator/server_config.sii\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \" connection_dedicated_port:\": \" connection_dedicated_port: {{server.build.default.port}}\",\r\n \" query_dedicated_port:\": \" query_dedicated_port: {{env.QUERY_PORT}}\",\r\n \" server_logon_token:\": \" server_logon_token: \\\"{{env.STEAM_TOKEN}}\\\"\",\r\n \" lobby_name:\": \" lobby_name: \\\"{{env.LOBBY_NAME}}\\\"\"\r\n }\r\n }\r\n}",
"logs": "{}",
"startup": "{\r\n \"done\": \"[MP] Session running.\"\r\n}",
"stop": "^^C"
},
"scripts": {
"installation": {
"container": "ghcr.io/parkervcp/installers:debian",
"entrypoint": "bash",
"script": "#!/bin/bash\r\n\r\n## just in case someone removed the defaults.\r\nif [[ \"${STEAM_USER}\" == \"\" ]] || [[ \"${STEAM_PASS}\" == \"\" ]]; then\r\n echo -e \"steam user is not set.\\n\"\r\n echo -e \"Using anonymous user.\\n\"\r\n STEAM_USER=anonymous\r\n STEAM_PASS=\"\"\r\n STEAM_AUTH=\"\"\r\nelse\r\n echo -e \"user set to ${STEAM_USER}\"\r\nfi\r\n\r\n## download and install steamcmd\r\ncd /tmp\r\nmkdir -p /mnt/server/steamcmd\r\ncurl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz\r\ntar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd\r\nmkdir -p /mnt/server/steamapps # Fix steamcmd disk write error when this folder is missing\r\ncd /mnt/server/steamcmd\r\n\r\n# SteamCMD fails otherwise for some reason, even running as root.\r\n# This is changed at the end of the install process anyways.\r\nchown -R root:root /mnt\r\nexport HOME=/mnt/server\r\n\r\n## install game using steamcmd\r\n./steamcmd.sh +force_install_dir /mnt/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +app_update ${SRCDS_APPID} validate +quit\r\n\r\n## set up 32 bit libraries\r\nmkdir -p /mnt/server/.steam/sdk32\r\ncp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so\r\n\r\n## set up 64 bit libraries\r\nmkdir -p /mnt/server/.steam/sdk64\r\ncp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so\r\n\r\n\r\n## add below your custom commands if needed\r\nmkdir -p /mnt/server/.local/share/\"American Truck Simulator\"/\r\n\r\nCONFIG_FILE=/mnt/server/.local/share/\"American Truck Simulator\"/server_config.sii\r\nif [ ! -f \"$CONFIG_FILE\" ]; then\r\n cd /mnt/server/.local/share/\"American Truck Simulator\"/\r\n echo \"a config file does not yet exist making one!\"\r\n curl -sSL -o server_config.sii https://raw.githubusercontent.com/parkervcp/eggs/master/game_eggs/steamcmd_servers/truck-simulator/server_config.sii\r\nfi\r\n\r\nPACKAGE_FILE=/mnt/server/.local/share/\"American Truck Simulator\"/server_packages.sii\r\nif [ ! -f \"$PACKAGE_FILE\" ]; then\r\n cd /mnt/server/.local/share/\"American Truck Simulator\"/\r\n echo \"a server_packages.sii file does not yet exist making one!\"\r\n curl -sSL -o server_packages.sii https://raw.githubusercontent.com/parkervcp/eggs/master/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/ats-files/server_packages.sii\r\nfi\r\n\r\nDATA_FILE=/mnt/server/.local/share/\"American Truck Simulator\"/server_packages.dat\r\nif [ ! -f \"$DATA_FILE\" ]; then\r\n cd /mnt/server/.local/share/\"American Truck Simulator\"/\r\n echo \"a server_packages.dat file does not yet exist making one!\"\r\n curl -sSL -o server_packages.dat https://raw.githubusercontent.com/parkervcp/eggs/master/game_eggs/steamcmd_servers/truck-simulator/american-truck-simulator/ats-files/server_packages.dat\r\nfi\r\n\r\n## install end\r\necho \"-----------------------------------------\"\r\necho \"Installation completed...\"\r\necho \"-----------------------------------------\""
}
},
"variables": [
{
"name": "Auto update",
"description": "",
"env_variable": "AUTO_UPDATE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "App ID",
"description": "",
"env_variable": "SRCDS_APPID",
"default_value": "2239530",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|in:2239530",
"field_type": "text"
},
{
"name": "Query port",
"description": "By there readme of the game the query port must be between 27015-27020, but from our testing this port can be any port",
"env_variable": "QUERY_PORT",
"default_value": "27016",
"user_viewable": true,
"user_editable": false,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Steam Auth token",
"description": "By default, whenever a dedicated server is launched it is using an anonymous account. For such an account non-persistent server id is generated (used for direct search). To avoid this you can acquire a logon token on https://steamcommunity.com/dev/managegameservers (game ownership is required)",
"env_variable": "STEAM_TOKEN",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:32",
"field_type": "text"
},
{
"name": "Lobby name",
"description": "",
"env_variable": "LOBBY_NAME",
"default_value": "American Truck Simulator",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:64",
"field_type": "text"
}
]
}