Skip to content

Commit 3ebc5fe

Browse files
authored
fix(kf): ensure newer steamclient.so is copied to serverfiles (#4391)
* master server true * move samp fix to pre start * bug * fix(kf): ensure newer steamclient.so is copied to serverfiles will allow KF Server to how in steam game server list
1 parent 9598fcc commit 3ebc5fe

File tree

4 files changed

+109
-28
lines changed

4 files changed

+109
-28
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ steamcmdforcewindows="no"
121121
branch=""
122122
betapassword=""
123123
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
124-
steammaster="false"
124+
steammaster="true"
125125

126126
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
127127
# 1: tmux kill

lgsm/modules/fix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ fn_apply_fix() {
5252
fi
5353
}
5454

55-
apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset pvr rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr)
56-
apply_post_install_fix=(av kf kf2 ro samp ut2k4 ut ut3)
55+
apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins kf nmrih onset pvr rust rw samp sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr)
56+
apply_post_install_fix=(av kf kf2 ro ut2k4 ut ut3)
5757

5858
# validate registered fixes for safe development
5959
for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do

lgsm/modules/fix_armar.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Website: https://linuxgsm.com
66
# Description: Resolves issues with Arma Reforger.
77

8-
module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
8+
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
99

1010
# Fixes: Profile directory doesn't exist.
1111
# Issue Link: https://feedback.bistudio.com/T164845

lgsm/modules/fix_kf.sh

Lines changed: 105 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,111 @@
77

88
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
99

10-
echo -e "applying WebAdmin ROOst.css fix."
11-
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
10+
# echo -e "applying WebAdmin ROOst.css fix."
11+
# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
1212
sed -i 's/none}/none;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
1313
sed -i 's/underline}/underline;/g' "${serverfiles}/Web/ServerAdmin/ROOst.css"
14-
fn_sleep_time
15-
echo -e "applying WebAdmin CharSet fix."
16-
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
14+
# echo -e "applying WebAdmin CharSet fix."
15+
# echo -e "http://forums.tripwireinteractive.com/showpost.php?p=442340&postcount=1"
1716
sed -i 's/CharSet="iso-8859-1"/CharSet="utf-8"/g' "${systemdir}/UWeb.int"
18-
fn_sleep_time
19-
echo -e "applying server name fix."
20-
fn_sleep_time
21-
echo -e "forcing server restart..."
22-
fn_sleep_time
23-
exitbypass=1
24-
command_start.sh
25-
fn_firstcommand_reset
26-
fn_sleep_time_5
27-
exitbypass=1
28-
command_stop.sh
29-
fn_firstcommand_reset
30-
exitbypass=1
31-
command_start.sh
32-
fn_firstcommand_reset
33-
fn_sleep_time_5
34-
exitbypass=1
35-
command_stop.sh
36-
fn_firstcommand_reset
17+
18+
# get md5sum of steamclient.so
19+
if [ -f "${serverfiles}/System/steamclient.so" ]; then
20+
steamclientmd5=$(md5sum "${serverfiles}/System/steamclient.so" | awk '{print $1;}')
21+
fi
22+
#get md5sum of libtier0_s.so
23+
if [ -f "${serverfiles}/System/libtier0_s.so" ]; then
24+
libtier0_smd5=$(md5sum "${serverfiles}/System/libtier0_s.so" | awk '{print $1;}')
25+
fi
26+
#get md5sum of libvstdlib_s.so
27+
if [ -f "${serverfiles}/System/libvstdlib_s.so" ]; then
28+
libvstdlib_smd5=$(md5sum "${serverfiles}/System/libvstdlib_s.so" | awk '{print $1;}')
29+
fi
30+
31+
# get md5sum of steamclient.so from steamcmd
32+
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
33+
steamcmdsteamclientmd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}')
34+
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
35+
steamcmdsteamclientmd5=$(md5sum "${steamcmddir}/linux32/steamclient.so" | awk '{print $1;}')
36+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then
37+
steamcmdsteamclientmd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" | awk '{print $1;}')
38+
fi
39+
40+
# get md5sum of libtier0_s.so from steamcmd
41+
if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then
42+
steamcmdlibtier0_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}')
43+
elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then
44+
steamcmdlibtier0_smd5=$(md5sum "${steamcmddir}/linux32/libtier0_s.so" | awk '{print $1;}')
45+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then
46+
steamcmdlibtier0_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" | awk '{print $1;}')
47+
fi
48+
49+
# get md5sum of libvstdlib_s.so from steamcmd
50+
if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then
51+
steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}')
52+
elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then
53+
steamcmdlibvstdlib_smd5=$(md5sum "${steamcmddir}/linux32/libvstdlib_s.so" | awk '{print $1;}')
54+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then
55+
steamcmdlibvstdlib_smd5=$(md5sum "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" | awk '{print $1;}')
56+
fi
57+
58+
if [ ! -f "${serverfiles}/System/steamclient.so" ] || [ "${steamcmdsteamclientmd5}" != "${steamclientmd5}" ]; then
59+
fixname="steamclient.so x86"
60+
fn_fix_msg_start
61+
if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then
62+
cp "${HOME}/.steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so"
63+
elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then
64+
cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/System/steamclient.so"
65+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" ]; then
66+
cp "${HOME}/.local/share/Steam/steamcmd/linux32/steamclient.so" "${serverfiles}/System/steamclient.so"
67+
fi
68+
fn_fix_msg_end
69+
fi
70+
71+
if [ ! -f "${serverfiles}/System/libtier0_s.so" ] || [ "${steamcmdlibtier0_smd5}" != "${libtier0_smd5}" ]; then
72+
fixname="libtier0_s.so"
73+
fn_fix_msg_start
74+
if [ -f "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" ]; then
75+
cp "${HOME}/.steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so"
76+
elif [ -f "${steamcmddir}/linux32/libtier0_s.so" ]; then
77+
cp "${steamcmddir}/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so"
78+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" ]; then
79+
cp "${HOME}/.local/share/Steam/steamcmd/linux32/libtier0_s.so" "${serverfiles}/System/libtier0_s.so"
80+
fi
81+
fn_fix_msg_end
82+
fi
83+
84+
if [ ! -f "${serverfiles}/System/libvstdlib_s.so" ] || [ "${steamcmdlibvstdlib_smd5}" != "${libvstdlib_smd5}" ]; then
85+
fixname="libvstdlib_s.so"
86+
fn_fix_msg_start
87+
if [ -f "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" ]; then
88+
cp "${HOME}/.steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so"
89+
elif [ -f "${steamcmddir}/linux32/libvstdlib_s.so" ]; then
90+
cp "${steamcmddir}/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so"
91+
elif [ -f "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" ]; then
92+
cp "${HOME}/.local/share/Steam/steamcmd/linux32/libvstdlib_s.so" "${serverfiles}/System/libvstdlib_s.so"
93+
fi
94+
fn_fix_msg_end
95+
fi
96+
97+
# if running install command
98+
if [ "${commandname}" == "INSTALL" ]; then
99+
echo -e "applying server name fix."
100+
fn_sleep_time
101+
echo -e "forcing server restart..."
102+
fn_sleep_time
103+
exitbypass=1
104+
command_start.sh
105+
fn_firstcommand_reset
106+
fn_sleep_time_5
107+
exitbypass=1
108+
command_stop.sh
109+
fn_firstcommand_reset
110+
exitbypass=1
111+
command_start.sh
112+
fn_firstcommand_reset
113+
fn_sleep_time_5
114+
exitbypass=1
115+
command_stop.sh
116+
fn_firstcommand_reset
117+
fi

0 commit comments

Comments
 (0)