Skip to content

Commit fce9f65

Browse files
authored
feat(monitor): prepare for gamedig 5 (#4510)
* feat: gamedig 5 * install gamedig in lgsm dir if node exists * and * use local gamedig version * local * palworld * pw query port * mbe * fix ro system system a * public ip * jc2m * fix(ti): update default map The default map in the tiserver configuration file has been updated from "/Game/TheIsle/Maps/Game/Isla_Spiro/Isla_Spiro" to "/Game/TheIsle/Maps/Game/Gateway/Gateway". This change ensures that the server starts with the correct default map. * fix: _default.cfg NOT SET * download package.json and run npm install * update samp * disable query for squad * correct name * feat: update querymode and querytype in server configs Changed querymode to 3 and set querytype to "eco" for ecoserver. Updated querymode to 2 and changed querytype to "protocol-valve" for sdtdserver. * feat: add new port command for bfv game Added a new port command for the "bfv" game in the info_messages script. * queryport eco * add eco rconport * adding message * if node 16 or above * rename to check_gamedig
1 parent 476ed02 commit fce9f65

23 files changed

+839
-65
lines changed

lgsm/config-default/config-lgsm/ecoserver/_default.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ stopmode="2"
131131
# 3: gamedig
132132
# 4: gsquery
133133
# 5: tcp
134-
querymode="1"
135-
querytype=""
134+
querymode="3"
135+
querytype="eco"
136136

137137
## Console type
138138
consoleverbose="yes"

lgsm/config-default/config-lgsm/jc2server/_default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ stopmode="2"
132132
# 4: gsquery
133133
# 5: tcp
134134
querymode="2"
135-
querytype="jc2mp"
135+
querytype="jc2m"
136136

137137
## Console type
138138
consoleverbose="yes"

lgsm/config-default/config-lgsm/mcbserver/_default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ stopmode="5"
125125
# 4: gsquery
126126
# 5: tcp
127127
querymode="2"
128-
querytype="minecraftbe"
128+
querytype="mbe"
129129

130130
## Console type
131131
consoleverbose="yes"

lgsm/config-default/config-lgsm/pwserver/_default.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ stopmode="2"
139139
# 3: gamedig
140140
# 4: gsquery
141141
# 5: tcp
142-
querymode="1"
143-
querytype="1"
142+
querymode="3"
143+
querytype="palworld"
144144

145145
## Console type
146146
consoleverbose="yes"

lgsm/config-default/config-lgsm/sampserver/_default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ stopmode="2"
123123
# 4: gsquery
124124
# 5: tcp
125125
querymode="3"
126-
querytype="samp"
126+
querytype="gtasam"
127127

128128
## Console type
129129
consoleverbose="no"

lgsm/config-default/config-lgsm/sdtdserver/_default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ stopmode="8"
134134
# 3: gamedig
135135
# 4: gsquery
136136
# 5: tcp
137-
querymode="5"
137+
querymode="2"
138138
querytype="protocol-valve"
139139

140140
## Console type

lgsm/config-default/config-lgsm/squadserver/_default.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ stopmode="2"
136136
# 3: gamedig
137137
# 4: gsquery
138138
# 5: tcp
139-
querymode="2"
140-
querytype="protocol-valve"
139+
querymode="1"
140+
querytype=""
141141

142142
## Console type
143143
consoleverbose="yes"

lgsm/modules/check.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,10 @@ for allowed_command in "${allowed_commands_array[@]}"; do
9999
check_system_requirements.sh
100100
fi
101101
done
102+
103+
allowed_commands_array=(DETAILS MONITOR START STOP UPDATE VALIDATE POST-DETAILS)
104+
for allowed_command in "${allowed_commands_array[@]}"; do
105+
if [ "${allowed_command}" == "${commandname}" ]; then
106+
check_gamedig.sh
107+
fi
108+
done

lgsm/modules/check_gamedig.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# LinuxGSM check_gamedig.sh module
3+
# Author: Daniel Gibbs
4+
# Contributors: http://linuxgsm.com/contrib
5+
# Website: https://linuxgsm.com
6+
# Description: Installs nodejs and gamedig
7+
8+
if [ "$(command -v node)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ] && [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then
9+
echo -e ""
10+
echo -e "${bold}${lightyellow}Installing Gamedig${default}"
11+
fn_script_log_info "Installing Gamedig"
12+
cd "${lgsmdir}" || exit
13+
wget -N --no-check-certificate "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${githubbranch}/package.json"
14+
npm install
15+
fi

lgsm/modules/check_ip.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,25 @@ function fn_is_valid_ip() {
3838

3939
# If the IP variable has been set by user.
4040
if fn_is_valid_ip "${ip}"; then
41-
queryips=("${ip}")
41+
queryips=("${ip}" "${publicip}")
4242
httpip=("${ip}")
4343
telnetip=("${ip}")
4444
# If the game config has an IP set.
4545
elif fn_is_valid_ip "${configip}"; then
46-
queryips=("${configip}")
46+
queryips=("${configip}" "${publicip}")
4747
ip="${configip}"
4848
httpip=("${configip}")
4949
telnetip=("${configip}")
5050
# If there is only 1 server IP address.
5151
# Some IP details can automatically use the one IP.
5252
elif [ "${#current_ips[@]}" == "1" ]; then
53-
queryips=("127.0.0.1" "${current_ips[@]}")
53+
queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
5454
ip="0.0.0.0"
5555
httpip=("${current_ips[@]}")
5656
telnetip=("${current_ips[@]}")
5757
# If no ip is set by the user and server has more than one IP.
5858
else
59-
queryips=("127.0.0.1" "${current_ips[@]}")
59+
queryips=("127.0.0.1" "${current_ips[@]}" "${publicip}")
6060
ip="0.0.0.0"
6161
httpip=("${ip}")
6262
telnetip=("${ip}")

0 commit comments

Comments
 (0)