forked from pelican-eggs/eggs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
egg-call-of-duty4-x.json
104 lines (104 loc) · 6.48 KB
/
egg-call-of-duty4-x.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2021-05-04T10:23:27+02:00",
"name": "Call of Duty 4X",
"author": "[email protected]",
"description": "A client and server modification for Call of Duty 4: Modern Warfare with the aim to fix bugs and enhance gameplay!",
"features": null,
"images": [
"quay.io\/parkervcp\/pterodactyl-images:base_debian"
],
"file_denylist": [],
"startup": "if [ ! -d \"{{GAME_FILE_PATH}}\" ]; then echo \"CoD 4 game files not found. Maybe they are not mounted?\"; echo \"In order for the server to start mount the game files here: {{GAME_FILE_PATH}}\"; while true; do sleep 2; done; fi; .\/cod4x18_dedrun +exec server.cfg +set dedicated \"{{SERVER_NETWORK_MODE}}\" +set sv_maxclients \"{{MAX_PLAYERS}}\" +set net_ip 0.0.0.0 +set net_port \"{{SERVER_PORT}}\" +set fs_basepath \"{{GAME_FILE_PATH}}\" +set fs_homepath . +map_rotate",
"config": {
"files": "{\r\n \"main\/server.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"sv_hostname\": \"sv_hostname \\\"{{server.build.env.SERVER_NAME}}\\\"\",\r\n \"rcon_password\": \"rcon_password \\\"{{server.build.env.ADMIN_PASSWORD}}\\\"\",\r\n \"g_password\": \"g_password \\\"{{server.build.env.SERVER_PASSWORD}}\\\"\",\r\n \"sv_authtoken\": \"sv_authtoken \\\"{{server.build.env.SERVER_AUTH_TOKEN}}\\\"\",\r\n \"sv_mapRotation\": \"sv_mapRotation \\\"{{server.build.env.MAP_ROTATION}}\\\"\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"By using this software you agree to the usage conditions\",\r\n \"userInteraction\": []\r\n}",
"logs": "{}",
"stop": "quit"
},
"scripts": {
"installation": {
"script": "#!\/bin\/ash\r\n# CoD 4X Installation script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\nDOWNLOAD_LINK=https:\/\/cod4x.me\/downloads\/cod4x_server-linux.zip\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\/\r\n\r\n## this is a simple script to validate a download url actually exists and is reachable\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}; then\r\n echo -e \"Download-URL is reachable.\"\r\n else \r\n echo -e \"Could not reach ${DOWNLOAD_LINK}.\"\r\n echo -e \"Aborting installation...\"\r\n exit 1\r\n fi\r\nfi\r\n\r\n# Download the server binaries\r\necho -e \"running 'curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}'\" \r\ncurl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n\r\necho -e \"Unpacking server files\"\r\nunzip ${DOWNLOAD_LINK##*\/}\r\n\r\necho -e \"Moving server files to \/mnt\/server\"\r\nmv .\/cod4x-linux-server\/* .\r\n\r\necho -e \"Cleaning up downloaded files.\"\r\nrm ${DOWNLOAD_LINK##*\/}\r\nrm -rf .\/cod4x-linux-server\r\n\r\necho -e \"Installing required runtime libs.\"\r\nmv .\/runtime\/libstdc++.so.6 .\r\n\r\necho -e \"Generating config file\"\r\ncat <<EOF > .\/main\/server.cfg\r\nsv_hostname \"${SERVER_NAME}\"\r\ng_password \"${SERVER_PASSWORD}\"\r\nrcon_password \"${ADMIN_PASSWORD}\"\r\n\r\nsv_punkbuster \"0\"\r\nsv_cheats \"0\"\r\nsv_voice \"0\"\r\nscr_teambalance \"1\"\r\ng_allowvote \"1\"\r\n\r\nsv_authorizemode \"0\"\r\nsv_authtoken \"${SERVER_AUTH_TOKEN}\"\r\n\r\nsv_floodProtect \"1\"\r\n\r\nsv_mapRotation \"${MAP_ROTATION}\"\r\nEOF\r\n\r\necho -e \"running 'chmod +x .\/cod4x18_dedrun'\"\r\nchmod +x .\/cod4x18_dedrun\r\n\r\necho -e \"Installation complete\"",
"container": "quay.io\/matthewp\/pterodactyl:alpine-install",
"entrypoint": "ash"
}
},
"variables": [
{
"name": "Server Name",
"description": "Hostname of the server.",
"env_variable": "SERVER_NAME",
"default_value": "Pterodactyl CoD 4X Server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:40"
},
{
"name": "Server Password",
"description": "Password of the server.",
"env_variable": "SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:20"
},
{
"name": "Admin Password",
"description": "RCON password for the server.",
"env_variable": "ADMIN_PASSWORD",
"default_value": "password123",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|min:8|max:20"
},
{
"name": "Server Slots",
"description": "Amount of players that can play on the server.",
"env_variable": "MAX_PLAYERS",
"default_value": "32",
"user_viewable": true,
"user_editable": false,
"rules": "required|digits_between:1,3|min:1"
},
{
"name": "Game File Path",
"description": "Path to the CoD 4 game files (has to be the same as the \"target\" of the mount)",
"env_variable": "GAME_FILE_PATH",
"default_value": "\/mnt\/gamefiles\/cod4",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:40"
},
{
"name": "Map Rotation",
"description": "Map rotation in Quake format.",
"env_variable": "MAP_ROTATION",
"default_value": "gametype war map mp_crossfire",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:1000"
},
{
"name": "Server Network Mode",
"description": "1 for LAN only, 2 for public",
"env_variable": "SERVER_NETWORK_MODE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|digits:1|min:1|max:2"
},
{
"name": "Server Authentication Token",
"description": "Token needed to list your server on the public masterserver. Generate here: https:\/\/cod4master.cod4x.me\/index.php?token_generator=true",
"env_variable": "SERVER_AUTH_TOKEN",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|size:40"
}
]
}