· 6 years ago · Sep 25, 2019, 12:08 AM
1<game_config>
2 <game_key>fivem_linux32</game_key>
3 <protocol>lgsl</protocol>
4 <lgsl_query_name>fivem</lgsl_query_name>
5 <game_name>FiveM</game_name>
6 <server_exec_name>run.sh</server_exec_name>
7 <cli_template>+exec server.cfg</cli_template>
8 <max_user_amount>3500</max_user_amount>
9 <mods>
10 <mod key="default">
11 <name>None</name>
12 </mod>
13 </mods>
14 <replace_texts>
15 <text key="home_name">
16 <default>sv_hostname.*</default>
17 <var>sv_hostname</var>
18 <filepath>server.cfg</filepath>
19 <options>sq</options>
20 </text>
21 <text key="control_password">
22 <default>rcon_password.*</default>
23 <var>rcon_password</var>
24 <filepath>server.cfg</filepath>
25 <options>sq</options>
26 </text>
27 <text key="max_players">
28 <default>sv_maxclients.*</default>
29 <var>sv_maxclients</var>
30 <filepath>server.cfg</filepath>
31 <options>s</options>
32 </text>
33 <text key="ip_port">
34 <default>endpoint_add_tcp.*</default>
35 <var>endpoint_add_tcp</var>
36 <filepath>server.cfg</filepath>
37 <options>sq</options>
38 </text>
39 <text key="ip_port">
40 <default>endpoint_add_udp.*</default>
41 <var>endpoint_add_udp</var>
42 <filepath>server.cfg</filepath>
43 <options>sq</options>
44 </text>
45 </replace_texts>
46 <custom_fields>
47 <field key="sv_licenseKey" type="text">
48 <default>sv_licenseKey.*</default>
49 <default_value></default_value>
50 <var>sv_licenseKey</var>
51 <filepath>server.cfg</filepath>
52 <options>s</options>
53 <desc>Sets the license key. A license can be generated at: <a href="https://keymaster.fivem.net/">https://keymaster.fivem.net/</a></desc>
54 </field>
55 <field key="set steam_webApiKey" type="text">
56 <default>set steam_webApiKey.*</default>
57 <default_value></default_value>
58 <var>set steam_webApiKey</var>
59 <filepath>server.cfg</filepath>
60 <options>s</options>
61 <desc># Steam Web API key, if you want to use Steam authentication: <a href="https://steamcommunity.com/dev/apikey">https://steamcommunity.com/dev/apikey;</desc>
62 </field>
63 </custom_fields>
64 <post_install>
65BASE="https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/"
66rm /cache/files
67wget $BASE -Otmp
68
69# Assuming the version schema isn't changed or the url above isn't moved, this will always work.
70LATEST_VERSION=$(grep -Po '(?<=href=")[^"]*' tmp | tail -1)
71
72wget "${BASE}${LATEST_VERSION}/fx.tar.xz"
73wget https://github.com/citizenfx/cfx-server-data/archive/master.zip -Ocfx-server-data.zip
74
75tar -xvf fx.tar.xz -C $PWD
76unzip cfx-server-data.zip -d $PWD/server-data
77mv $PWD/server-data/cfx-server-data-master/resources $PWD/resources
78
79cat > $PWD/server.cfg <<END
80# you probably don't want to change these!
81# only change them if you're using a server with multiple network interfaces
82endpoint_add_tcp "0.0.0.0:30120"
83endpoint_add_udp "0.0.0.0:30120"
84
85start mapmanager
86start chat
87start spawnmanager
88start sessionmanager
89start fivem
90start hardcap
91start rconlog
92start scoreboard
93start playernames
94
95sv_scriptHookAllowed 1
96
97# change this
98rcon_password ogpPassword
99
100sv_hostname "My new FXServer!"
101
102# nested configs!
103# exec server_internal.cfg
104
105# loading a server icon (96x96 PNG file)
106#load_server_icon myLogo.png
107
108# convars for use from script
109# set temp_convar "hey world!"
110
111# disable announcing? clear out the master by uncommenting this
112#sv_master1 ""
113
114# want to only allow players authenticated with a third-party provider like Steam?
115#sv_authMaxVariance 1
116#sv_authMinTrust 5
117
118# add system admins
119# add_ace group.admin command allow # allow all commands
120# add_ace group.admin command.quit deny # but don't allow quit
121# add_principal identifier.steam:110000112345678 group.admin # add the admin to the group
122
123# remove the # to hide player endpoints in external log output
124#sv_endpointprivacy true
125
126# server slots limit (must be between 1 and 31)
127sv_maxclients 30
128
129# license key for server (https://keymaster.fivem.net)
130sv_licenseKey superduperkey
131END
132# Steam Web API key, if you want to use Steam authentication (https://steamcommunity.com/dev/apikey)
133# -> replace "" with the key
134set steam_webApiKey ""
135rm tmp fx.tar.xz cfx-server-data.zip
136rm -rf $PWD/server-data
137 </post_install>
138
139 <configuration_files>
140 <file description="Main Config File">server.cfg</file>
141 </configuration_files>
142</game_config>