Skip to content

Commit ce2c06d

Browse files
committed
feat(newserver): Trackmania 2020
1 parent b529f00 commit ce2c06d

23 files changed

+237
-2
lines changed
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
##################################
2+
######## Default Settings ########
3+
##################################
4+
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN!
5+
# Copy settings from here and use them in either:
6+
# common.cfg - applies settings to every instance.
7+
# [instance].cfg - applies settings to a specific instance.
8+
9+
#### Game Server Settings ####
10+
11+
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
12+
gamesettings="Matchsettings/test.txt"
13+
14+
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
15+
startparameters="/noDaemon /game_Settings=${gamesettings} /dedicated_cfg=${servercfg}"
16+
17+
#### LinuxGSM Settings ####
18+
19+
## LinuxGSM Stats
20+
# Send useful stats to LinuxGSM developers.
21+
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
22+
# (on|off)
23+
stats="off"
24+
25+
## Notification Alerts
26+
# (on|off)
27+
28+
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
29+
displayip=""
30+
31+
# More info | https://docs.linuxgsm.com/alerts#more-info
32+
postalert="off"
33+
34+
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
35+
discordalert="off"
36+
discordwebhook="webhook"
37+
38+
# Email Alerts | https://docs.linuxgsm.com/alerts/email
39+
emailalert="off"
40+
41+
emailfrom=""
42+
43+
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
44+
gotifyalert="off"
45+
gotifytoken="token"
46+
gotifywebhook="webhook"
47+
48+
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
49+
iftttalert="off"
50+
ifttttoken="accesstoken"
51+
iftttevent="linuxgsm_alert"
52+
53+
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
54+
mailgunalert="off"
55+
mailgunapiregion="us"
56+
mailguntoken="accesstoken"
57+
mailgundomain="example.com"
58+
mailgunemailfrom="[email protected]"
59+
mailgunemail="[email protected]"
60+
61+
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
62+
pushbulletalert="off"
63+
pushbullettoken="accesstoken"
64+
channeltag=""
65+
66+
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
67+
pushoveralert="off"
68+
pushovertoken="accesstoken"
69+
pushoveruserkey="userkey"
70+
71+
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
72+
rocketchatalert="off"
73+
rocketchatwebhook="webhook"
74+
rocketchattoken=""
75+
76+
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
77+
slackalert="off"
78+
slackwebhook="webhook"
79+
80+
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
81+
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
82+
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
83+
telegramapi="api.telegram.org"
84+
telegramalert="off"
85+
telegramtoken="accesstoken"
86+
telegramchatid=""
87+
curlcustomstring=""
88+
89+
## Updating | https://docs.linuxgsm.com/commands/update
90+
updateonstart="off"
91+
92+
## Backup | https://docs.linuxgsm.com/commands/backup
93+
maxbackups="4"
94+
maxbackupdays="30"
95+
stoponbackup="on"
96+
97+
## Logging | https://docs.linuxgsm.com/features/logging
98+
consolelogging="on"
99+
logdays="7"
100+
101+
## Monitor | https://docs.linuxgsm.com/commands/monitor
102+
# Query delay time
103+
querydelay="1"
104+
105+
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
106+
ansi="on"
107+
108+
#### Advanced Settings ####
109+
110+
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
111+
sleeptime="0.5"
112+
113+
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
114+
# 1: tmux kill
115+
# 2: CTRL+c
116+
# 3: quit
117+
# 4: quit 120s
118+
# 5: stop
119+
# 6: q
120+
# 7: exit
121+
# 8: 7 Days to Die
122+
# 9: GoldSrc
123+
# 10: Avorion
124+
# 11: end
125+
stopmode="2"
126+
127+
## Query mode
128+
# 1: session only
129+
# 2: gamedig (gsquery fallback)
130+
# 3: gamedig
131+
# 4: gsquery
132+
# 5: tcp
133+
querymode="5"
134+
querytype=""
135+
136+
## Console type
137+
consoleverbose="no"
138+
consoleinteract="no"
139+
140+
## Game Server Details
141+
# Do not edit
142+
gamename="Trackmania 2020"
143+
engine="maniaplanet"
144+
glibc="2.18"
145+
146+
#### Directories ####
147+
# Edit with care
148+
149+
## Game Server Directories
150+
systemdir="${serverfiles}"
151+
executabledir="${serverfiles}"
152+
executable="./TrackmaniaServer"
153+
servercfgdir="${systemdir}/UserData/Config"
154+
servercfg="${selfname}.xml"
155+
servercfgdefault="server.xml"
156+
servercfgfullpath="${servercfgdir}/${servercfg}"
157+
158+
## Backup Directory
159+
backupdir="${lgsmdir}/backup"
160+
161+
## Logging Directories
162+
logdir="${rootdir}/log"
163+
gamelogdir="${systemdir}/Logs"
164+
lgsmlogdir="${logdir}/script"
165+
consolelogdir="${logdir}/console"
166+
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
167+
consolelog="${consolelogdir}/${selfname}-console.log"
168+
alertlog="${lgsmlogdir}/${selfname}-alert.log"
169+
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
170+
171+
## Logs Naming
172+
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
173+
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"

lgsm/data/almalinux-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/almalinux-9.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/centos-7.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/centos-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/centos-9.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/debian-10.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/debian-11.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/debian-9.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/rhel-7.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/rhel-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/rhel-9.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/rocky-8.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/rocky-9.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl.i686
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/serverlist.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ tf2,tf2server,Team Fortress 2,ubuntu-22.04
110110
tfc,tfcserver,Team Fortress Classic,ubuntu-22.04
111111
ti,tiserver,The Isle,ubuntu-22.04
112112
ts,tsserver,The Specialists,ubuntu-22.04
113+
tm2020,tm2020server,Trackmania 2020,ubuntu-22.04
113114
ts3,ts3server,Teamspeak 3,ubuntu-22.04
114115
tu,tuserver,Tower Unite,ubuntu-22.04
115116
tw,twserver,Teeworlds,ubuntu-22.04
@@ -128,4 +129,3 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04
128129
wurm,wurmserver,Wurm Unlimited,ubuntu-22.04
129130
zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04
130131
zps,zpsserver,Zombie Panic! Source,ubuntu-22.04
131-

lgsm/data/ubuntu-16.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/ubuntu-18.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/ubuntu-20.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/ubuntu-21.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/data/ubuntu-22.04.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ terraria
110110
tf2,libcurl4-gnutls-dev:i386
111111
tfc
112112
ti
113+
tm2020,xmlstarlet
113114
ts
114115
ts3
115116
tu

lgsm/modules/info_game.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,30 @@ fn_info_game_ti() {
19391939

19401940
}
19411941

1942+
fn_info_game_maniaplanet() {
1943+
if [ ! -f "${servercfgfullpath}" ]; then
1944+
servername="${unavailable}"
1945+
maxplayers="${zero}"
1946+
else
1947+
# To avoid to have a error when not installed or on distro with unsupported dep checking
1948+
if [ -x "$(command -v xmlstarlet)" ]; then
1949+
servername=$(xmlstarlet sel -t -v '/dedicated/server_options/name' "${servercfgfullpath}")
1950+
maxplayers=$(xmlstarlet sel -t -v '/dedicated/server_options/max_players' "${servercfgfullpath}")
1951+
serverpassword=$(xmlstarlet sel -t -v '/dedicated/server_options/password' "${servercfgfullpath}")
1952+
configip=$(xmlstarlet sel -t -v '/dedicated/server_options/bind_ip_address' "${servercfgfullpath}")
1953+
port=$(xmlstarlet sel -t -v '/dedicated/server_options/server_port' "${servercfgfullpath}")
1954+
queryport=$(xmlstarlet sel -t -v '/dedicated/server_options/xmlrpc_port' "${servercfgfullpath}")
1955+
else
1956+
fn_script_log_info "cannot parse config as xmlstarlet is no in the PATH"
1957+
fn_print_info_nl "cannot parse config as xmlstarlet is no in the PATH"
1958+
fi
1959+
serverpassword=${serverpassword:-"NOT SET"}
1960+
configip=${configip:-"0.0.0.0"}
1961+
port=${port:-"2350"}
1962+
queryport=${queryport:-"5000"}
1963+
fi
1964+
}
1965+
19421966
fn_info_game_ts3() {
19431967
# Config
19441968
if [ ! -f "${servercfgfullpath}" ]; then
@@ -2537,6 +2561,8 @@ elif [ "${shortname}" == "wmc" ]; then
25372561
fn_info_game_wmc
25382562
elif [ "${shortname}" == "wurm" ]; then
25392563
fn_info_game_wurm
2564+
elif [ "${engine}" == "maniaplanet" ]; then
2565+
fn_info_game_maniaplanet
25402566
elif [ "${engine}" == "prism3d" ]; then
25412567
fn_info_game_prism3d
25422568
elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then

0 commit comments

Comments
 (0)