Skip to content

Commit c9cc075

Browse files
committed
feat(newserver): Trackmania 2020
1 parent 16dcc76 commit c9cc075

23 files changed

+239
-1
lines changed
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+
email="email@example.com"
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="alert@example.com"
59+
mailgunemail="email@myemail.com"
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

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/almalinux-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/centos-7.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/centos-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ terraria
107107
tf2,libcurl.i686
108108
tfc
109109
ti
110+
tm2020,xmlstarlet
110111
ts
111112
ts3
112113
tu

lgsm/data/centos-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ terraria
107107
tf2,libcurl.i686
108108
tfc
109109
ti
110+
tm2020,xmlstarlet
110111
ts
111112
ts3
112113
tu

lgsm/data/debian-10.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/debian-11.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/debian-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/rhel-7.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/rhel-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/rhel-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/rocky-8.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/rocky-9.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl.i686
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/serverlist.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ tf2,tf2server,Team Fortress 2
108108
tfc,tfcserver,Team Fortress Classic
109109
ti,tiserver,The Isle
110110
ts,tsserver,The Specialists
111+
tm2020,tm2020server,Trackmania 2020
111112
ts3,ts3server,Teamspeak 3
112113
tu,tuserver,Tower Unite
113114
tw,twserver,Teeworlds

lgsm/data/ubuntu-16.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ terraria
107107
tf2,libcurl4-gnutls-dev:i386
108108
tfc
109109
ti
110+
tm2020,xmlstarlet
110111
ts
111112
ts3
112113
tu

lgsm/data/ubuntu-18.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/ubuntu-20.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/ubuntu-21.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ terraria,libsdl
108108
tf2,libcurl4-gnutls-dev:i386
109109
tfc
110110
ti
111+
tm2020,xmlstarlet
111112
ts
112113
ts3
113114
tu

lgsm/data/ubuntu-22.04.csv

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ terraria,libsdl
106106
tf2,libcurl4-gnutls-dev:i386
107107
tfc
108108
ti
109+
tm2020,xmlstarlet
109110
ts
110111
ts3
111112
tu

lgsm/functions/info_game.sh

+26
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,30 @@ fn_info_game_ti() {
19171917

19181918
}
19191919

1920+
fn_info_game_maniaplanet() {
1921+
if [ ! -f "${servercfgfullpath}" ]; then
1922+
servername="${unavailable}"
1923+
maxplayers="${zero}"
1924+
else
1925+
# To avoid to have a error when not installed or on distro with unsupported dep checking
1926+
if [ -x "$(command -v xmlstarlet)" ]; then
1927+
servername=$(xmlstarlet sel -t -v '/dedicated/server_options/name' "${servercfgfullpath}")
1928+
maxplayers=$(xmlstarlet sel -t -v '/dedicated/server_options/max_players' "${servercfgfullpath}")
1929+
serverpassword=$(xmlstarlet sel -t -v '/dedicated/server_options/password' "${servercfgfullpath}")
1930+
configip=$(xmlstarlet sel -t -v '/dedicated/server_options/bind_ip_address' "${servercfgfullpath}")
1931+
port=$(xmlstarlet sel -t -v '/dedicated/server_options/server_port' "${servercfgfullpath}")
1932+
queryport=$(xmlstarlet sel -t -v '/dedicated/server_options/xmlrpc_port' "${servercfgfullpath}")
1933+
else
1934+
fn_script_log_info "cannot parse config as xmlstarlet is no in the PATH"
1935+
fn_print_info_nl "cannot parse config as xmlstarlet is no in the PATH"
1936+
fi
1937+
serverpassword=${serverpassword:-"NOT SET"}
1938+
configip=${configip:-"0.0.0.0"}
1939+
port=${port:-"2350"}
1940+
queryport=${queryport:-"5000"}
1941+
fi
1942+
}
1943+
19201944
fn_info_game_ts3() {
19211945
# Config
19221946
if [ ! -f "${servercfgfullpath}" ]; then
@@ -2515,6 +2539,8 @@ elif [ "${shortname}" == "wmc" ]; then
25152539
fn_info_game_wmc
25162540
elif [ "${shortname}" == "wurm" ]; then
25172541
fn_info_game_wurm
2542+
elif [ "${engine}" == "maniaplanet" ]; then
2543+
fn_info_game_maniaplanet
25182544
elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsrc" ]; then
25192545
fn_info_game_source
25202546
elif [ "${engine}" == "unreal2" ]; then

0 commit comments

Comments
 (0)