-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathegg-five-m.json
282 lines (282 loc) · 19.7 KB
/
egg-five-m.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2023-09-27T00:39:19+02:00",
"name": "FiveM",
"author": "parker@parkervcp.com",
"description": "A new FiveM egg with additional customization and some minor complex functionality.",
"features": null,
"docker_images": {
"ghcr.io\/darksaid98\/games:fivem": "ghcr.io\/darksaid98\/games:fivem"
},
"file_denylist": [],
"startup": "$(pwd)\/alpine\/opt\/cfx-server\/ld-musl-x86_64.so.1 --library-path \"$(pwd)\/alpine\/usr\/lib\/v8\/:$(pwd)\/alpine\/lib\/:$(pwd)\/alpine\/usr\/lib\/\" -- $(pwd)\/alpine\/opt\/cfx-server\/FXServer +set citizen_dir $(pwd)\/alpine\/opt\/cfx-server\/citizen\/ +set sv_licenseKey \"{{FIVEM_LICENSE}}\" +set steam_webApiKey \"{{STEAM_WEBAPIKEY}}\" +set sv_maxclients {{MAX_PLAYERS}} +sv_hostname \"{{SERVER_HOSTNAME}}\" +sets sv_projectName \"{{SERVER_PNAME}}\" +sets sv_projectDesc \"{{SERVER_PDESC}}\" +set onesync {{ONESYNC_ENABLED}} +set onesync_population {{ONESYNC_POPULATION}} +set onesync_distanceCullVehicles {{DISTANCECULL_VEHICLES}} +set onesync_forceMigration {{FORCE_MIGRATION}} +set onesync_workaround763185 {{ONESYNC_WORKAROUND}} +set serverProfile default +set svgui_disable {{SVGUI_DISABLE}} +setr voice_use3dAudio {{VOICE_USE3DAUDIO}} +setr voice_useSendingRangeOnly {{VOICE_USESENDINGRANGEONLY}} +setr voice_useNativeAudio {{VOICE_USENATIVEAUDIO}} +set sv_requestParanoia = {{SV_REQUESTPARANOIA}} +set sv_enforceGameBuild {{SV_GAMEBUILD}} +set txAdminPort {{TXADMIN_PORT}} $( [ \"$TXADMIN_ENABLE\" == \"1\" ] || printf %s '+exec server.cfg' )",
"config": {
"files": "{\r\n \"server.cfg\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"endpoint_add_tcp\": \"endpoint_add_tcp \\\"0.0.0.0:{{server.build.default.port}}\\\"\",\r\n \"endpoint_add_udp\": \"endpoint_add_udp \\\"0.0.0.0:{{server.build.default.port}}\\\"\",\r\n \"set steam_webApiKey\": \"set steam_webApiKey \\\"{{server.build.env.STEAM_WEBAPIKEY}}\\\"\",\r\n \"sv_hostname\": \"sv_hostname \\\"{{server.build.env.SERVER_HOSTNAME}}\\\"\",\r\n \"sets sv_projectName\": \"sets sv_projectName \\\"{{server.build.env.SERVER_PNAME}}\\\"\",\r\n \"sets sv_projectDesc\": \"sets sv_projectDesc \\\"{{server.build.env.SERVER_PDESC}}\\\"\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"succeeded. Welcome!\"\r\n}",
"logs": "{\r\n \"custom\": true,\r\n \"location\": \"logs\/latest.log\"\r\n}",
"stop": "quit"
},
"scripts": {
"installation": {
"script": "#!\/bin\/ash\r\n# FiveM Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update -y\r\napt install -y tar xz-utils curl git file jq unzip\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nRELEASE_PAGE=$(curl -sSL https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/?$RANDOM)\r\n\r\n# Check wether to run installation or update version of script\r\nif [ ! -d \".\/alpine\/\" ] && [ ! -d \".\/resources\/\" ]; then\r\n # Install script\r\n echo \"Beginning installation of new FiveM server.\"\r\n\r\n # Grab download link from FIVEM_VERSION\r\n if [ \"${FIVEM_VERSION}\" == \"latest\" ] || [ -z ${FIVEM_VERSION} ] ; then\r\n # Grab latest optional artifact if version requested is latest or null\r\n LATEST_ARTIFACT=$(echo -e \"${RELEASE_PAGE}\" | grep \"LATEST OPTIONAL\" -B1 | grep -Eo 'href=\".*\/*.tar.xz\"' | grep -Eo '\".*\"' | sed 's\/\\\"\/\/g' | sed 's\/\\.\\\/\/\/1')\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${LATEST_ARTIFACT})\r\n else\r\n # Grab specific artifact if it exists\r\n VERSION_LINK=$(echo -e \"${RELEASE_PAGE}\" | grep -Eo 'href=\".*\/*.tar.xz\"' | grep -Eo '\".*\"' | sed 's\/\\\"\/\/g' | sed 's\/\\.\\\/\/\/1' | grep ${FIVEM_VERSION})\r\n if [ \"${VERSION_LINK}\" == \"\" ]; then\r\n echo -e \"Defaulting to directly downloading artifact as the version requested was not found on page.\"\r\n else\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${FIVEM_VERSION}\/fx.tar.xz)\r\n fi\r\n fi\r\n\r\n # Download artifact and get filetype\r\n echo -e \"Running curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}...\"\r\n curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n echo \"Extracting FiveM artifact files...\"\r\n FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\n\r\n # Unpack artifact depending on filetype\r\n if [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\n elif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${DOWNLOAD_LINK##*\/}\r\n elif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${DOWNLOAD_LINK##*\/}\r\n else\r\n echo -e \"Downloaded artifact of unknown filetype. Exiting.\"\r\n exit 2\r\n fi\r\n\r\n # Delete original bash launch script\r\n rm -rf ${DOWNLOAD_LINK##*\/} run.sh\r\n\r\n if [ -e server.cfg ]; then\r\n echo \"Server config file already exists. Skipping download of new one.\"\r\n else\r\n echo \"Downloading default FiveM server config...\"\r\n curl https:\/\/raw.githubusercontent.com\/darksaid98\/pterodactyl-fivem-egg\/master\/server.cfg >> server.cfg\r\n fi\r\n\r\n # Clone resources repo from git or install FiveM default resources\r\n if [ \"${GIT_ENABLED}\" == \"1\" ] && [ ! -d \"\/mnt\/server\/resources\" ]; then\r\n # Download from git\r\n \r\n echo \"Preparing to clone resources repo from git.\";\r\n\r\n if [[ ${GIT_REPOURL} != *.git ]]; then # Add .git at end of URL\r\n GIT_REPOURL=${GIT_REPOURL}.git\r\n fi\r\n\r\n if [ -z \"${GIT_USERNAME}\" ] && [ -z \"${GIT_TOKEN}\" ]; then # Check for git username & token\r\n echo -e \"Git Username or Git Token was not specified.\"\r\n else\r\n GIT_REPOURL=\"https:\/\/${GIT_USERNAME}:${GIT_TOKEN}@$(echo -e ${GIT_REPOURL} | cut -d\/ -f3-)\"\r\n fi\r\n\r\n if [ -z ${GIT_BRANCH} ]; then\r\n echo -e \"Cloning default branch into \/resources\/*.\"\r\n git clone ${GIT_REPOURL} \/mnt\/server\/resources\r\n else\r\n echo -e \"Cloning ${GIT_BRANCH} branch into \/resources\/*.\"\r\n git clone --single-branch --branch ${GIT_BRANCH} ${GIT_REPOURL} \/mnt\/server\/resources && echo \"Finished cloning into \/resources\/* from Git.\" || echo \"Failed cloning into \/resources\/* from Git.\"\r\n fi\r\n\r\n else\r\n # Download FiveM default server resources\r\n\r\n mkdir -p \/mnt\/server\/resources\r\n echo \"Preparing to clone default FiveM resources.\"\r\n git clone https:\/\/github.com\/citizenfx\/cfx-server-data.git \/tmp && echo \"Downloaded server from git.\" || echo \"Downloading from git failed.\"\r\n cp -Rf \/tmp\/resources\/* resources\/\r\n\r\n fi\r\n\r\n mkdir logs\/\r\n echo \"Installation complete.\"\r\n\r\nelse\r\n # Update script\r\n echo \"Beginning update of existing FiveM server artifact.\"\r\n\r\n # Delete old artifact\r\n if [ -d \".\/alpine\/\" ]; then\r\n echo \"Deleting old artifact...\"\r\n rm -r .\/alpine\/\r\n while [ -d \".\/alpine\/\" ]; do\r\n sleep 1s\r\n done\r\n echo \"Deleted old artifact files successfully.\"\r\n fi\r\n\r\n # Grab download link from FIVEM_VERSION\r\n if [ \"${FIVEM_VERSION}\" == \"latest\" ] || [ -z ${FIVEM_VERSION} ] ; then\r\n # Grab latest optional artifact if version requested is latest or null\r\n LATEST_ARTIFACT=$(echo -e \"${RELEASE_PAGE}\" | grep \"LATEST OPTIONAL\" -B1 | grep -Eo 'href=\".*\/*.tar.xz\"' | grep -Eo '\".*\"' | sed 's\/\\\"\/\/g' | sed 's\/\\.\\\/\/\/1')\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${LATEST_ARTIFACT})\r\n else\r\n # Grab specific artifact if it exists\r\n VERSION_LINK=$(echo -e \"${RELEASE_PAGE}\" | grep -Eo 'href=\".*\/*.tar.xz\"' | grep -Eo '\".*\"' | sed 's\/\\\"\/\/g' | sed 's\/\\.\\\/\/\/1' | grep ${FIVEM_VERSION})\r\n if [ \"${VERSION_LINK}\" == \"\" ]; then\r\n echo -e \"Defaulting to directly downloading artifact as the version requested was not found on page.\"\r\n else\r\n DOWNLOAD_LINK=$(echo https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/${FIVEM_VERSION}\/fx.tar.xz)\r\n fi\r\n fi\r\n\r\n # Download artifact and get filetype\r\n echo -e \"Running curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}...\"\r\n curl -sSL ${DOWNLOAD_LINK} -o ${DOWNLOAD_LINK##*\/}\r\n echo \"Extracting FiveM artifact files...\"\r\n FILETYPE=$(file -F ',' ${DOWNLOAD_LINK##*\/} | cut -d',' -f2 | cut -d' ' -f2)\r\n\r\n # Unpack artifact depending on filetype\r\n if [ \"$FILETYPE\" == \"gzip\" ]; then\r\n tar xzvf ${DOWNLOAD_LINK##*\/}\r\n elif [ \"$FILETYPE\" == \"Zip\" ]; then\r\n unzip ${DOWNLOAD_LINK##*\/}\r\n elif [ \"$FILETYPE\" == \"XZ\" ]; then\r\n tar xvf ${DOWNLOAD_LINK##*\/}\r\n else\r\n echo -e \"Downloaded artifact of unknown filetype. Exiting.\"\r\n exit 2\r\n fi\r\n\r\n # Delete original bash launch script\r\n rm -rf ${DOWNLOAD_LINK##*\/} run.sh\r\n\r\n echo \"Update complete.\"\r\n\r\nfi",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "FiveM License Key",
"description": "Required to start the service. Get your keys at https:\/\/keymaster.fivem.net\/",
"env_variable": "FIVEM_LICENSE",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:33",
"field_type": "text"
},
{
"name": "Steam Web Api Key",
"description": "Use your Steam WebApiKey or set to 'none'. Get your key at https:\/\/steamcommunity.com\/dev\/apikey\/.",
"env_variable": "STEAM_WEBAPIKEY",
"default_value": "none",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "FiveM Version",
"description": "Downloads the latest or specified FiveM server artifact.\r\n\r\nSet to 'latest' or empty to download the latest optional artifact.\r\nOr specify a direct version to download like this '1383-e5ea040353ce1b8bc86e37982bf5d888938e3096'.\r\n\r\nYou can find the latest version from here - https:\/\/runtime.fivem.net\/artifacts\/fivem\/build_proot_linux\/master\/\r\n\r\nPressing 'Reinstall Server' in 'Settings' will remove the currently installed server artifact and replace it with an updated one.",
"env_variable": "FIVEM_VERSION",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:50",
"field_type": "text"
},
{
"name": "Git Enabled",
"description": "Enabling this will clone or pull the specified repository into \/resources on each server startup. If you are installing the server now, this will clone the git repo.",
"env_variable": "GIT_ENABLED",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Git Username",
"description": "The username used to authenticate with git.",
"env_variable": "GIT_USERNAME",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:39",
"field_type": "text"
},
{
"name": "Git Token",
"description": "The password used to authenticate with git.\r\n\r\nIt's best practice to use a Personal Access Token.\r\nhttps:\/\/github.com\/settings\/tokens\r\nhttps:\/\/gitlab.com\/-\/profile\/personal_access_tokens",
"env_variable": "GIT_TOKEN",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "Git Repository URL",
"description": "URL to Git repository.\r\n\r\nExample: https:\/\/github.com\/citizenfx\/cfx-server-data",
"env_variable": "GIT_REPOURL",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "Git Branch",
"description": "The name of the branch you wish to use. The default will be used if this is not specified.",
"env_variable": "GIT_BRANCH",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "Enable txAdmin",
"description": "Enables txAdmin.\r\n\r\n(default is off)",
"env_variable": "TXADMIN_ENABLE",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "txAdmin Port",
"description": "The port for the txAdmin panel.",
"env_variable": "TXADMIN_PORT",
"default_value": "40120",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:5",
"field_type": "text"
},
{
"name": "FiveM Game Build",
"description": "Sets the sv_enforceGameBuild convar. This specifies the client GTA build the server should be on. \r\nRead docs for possible values: https:\/\/docs.fivem.net\/docs\/server-manual\/server-commands\/#sv_enforcegamebuild-build",
"env_variable": "SV_GAMEBUILD",
"default_value": "2944",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:4",
"field_type": "text"
},
{
"name": "Max Players",
"description": "Sets the maximum player count.",
"env_variable": "MAX_PLAYERS",
"default_value": "8",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|between:1,2048",
"field_type": "text"
},
{
"name": "Server Hostname",
"description": "The name that shows up when selecting the server in the server browser.",
"env_variable": "SERVER_HOSTNAME",
"default_value": "My new FXServer!",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Project Name",
"description": "The name that shows up in the server browser.",
"env_variable": "SERVER_PNAME",
"default_value": "My Server Name",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Project Description",
"description": "The description that shows up in the server browser.",
"env_variable": "SERVER_PDESC",
"default_value": "Default project description. Please change me.",
"user_viewable": true,
"user_editable": true,
"rules": "required|string",
"field_type": "text"
},
{
"name": "Onesync",
"description": "Set to 'on' to enable Onesync. Set to 'off' if you want to disable Onesync. Optionally you can use 'legacy' however it is strongly advised against. If you are running a server you should have Onesync enabled.",
"env_variable": "ONESYNC_ENABLED",
"default_value": "on",
"user_viewable": true,
"user_editable": true,
"rules": "required|in:on,off,legacy",
"field_type": "text"
},
{
"name": "Onesync Distance Cull Vehicles",
"description": "Only use this with Onesync enabled! Enable or disable distance culling for vehicles.",
"env_variable": "DISTANCECULL_VEHICLES",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Onesync Force Migration",
"description": "Only use this with Onesync enabled! Enable or disable force migration.",
"env_variable": "FORCE_MIGRATION",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Onesync Population",
"description": "Enables or disables population on Onesync.",
"env_variable": "ONESYNC_POPULATION",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Onesync Workaround",
"description": "Enable onesync workaround.",
"env_variable": "ONESYNC_WORKAROUND",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Use3dAudio",
"description": "Enable or disable 3d audio. Does nothing if 'UseNativeAudio' is set to true.",
"env_variable": "VOICE_USE3DAUDIO",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "UseSendingRangeOnly",
"description": "Use sending range only.",
"env_variable": "VOICE_USESENDINGRANGEONLY",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "UseNativeAudio",
"description": "Enable or disable Native audio. You should be using this for the best possible VOIP. Greatly superior to 'Use3dAudio'.",
"env_variable": "VOICE_USENATIVEAUDIO",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Request Paranoia",
"description": "A way to block proxy-based HTTP floods. Read: https:\/\/github.com\/citizenfx\/fivem\/commit\/f7c5493e5f4040933c4d9d505e4d2989e4149567",
"env_variable": "SV_REQUESTPARANOIA",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|between:0,3",
"field_type": "text"
},
{
"name": "Svgui Disabled",
"description": "Enable or disable svgui, doesn't work on Linux anyway so I'm not sure why you'd use this.",
"env_variable": "SVGUI_DISABLE",
"default_value": "1",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
}
]
}