From fa5a6689972b24e51b8da1ab094546a13c733432 Mon Sep 17 00:00:00 2001 From: Christian Date: Sun, 13 Sep 2020 22:41:01 +0200 Subject: [PATCH] fix(csserver): fix missing steamclient.so (#3030) Co-authored-by: Daniel Gibbs --- lgsm/functions/core_functions.sh | 5 +++++ lgsm/functions/fix.sh | 2 ++ lgsm/functions/fix_cs.sh | 21 +++++++++++++++++++++ lgsm/functions/fix_hw.sh | 4 ---- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 lgsm/functions/fix_cs.sh diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index 2057caf94..c11253717 100644 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -325,6 +325,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_cs.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_csgo.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 74d6fb00b..a3c8afe39 100644 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -40,6 +40,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_arma3.sh elif [ "${shortname}" == "ark" ]; then fix_ark.sh + elif [ "${shortname}" == "cs" ]; then + fix_cs.sh elif [ "${shortname}" == "csgo" ]; then fix_csgo.sh elif [ "${shortname}" == "cmw" ]; then diff --git a/lgsm/functions/fix_cs.sh b/lgsm/functions/fix_cs.sh new file mode 100644 index 000000000..de1fa175b --- /dev/null +++ b/lgsm/functions/fix_cs.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# LinuxGSM fix_cs.sh function +# Author: Christian Birk +# Website: https://linuxgsm.com +# Description: Resolves various issues with Counter Strike. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +if [ "${shortname}" == "cs" ]; then + # Fixes: steamclient.so: cannot open shared object file: No such file or directory + if [ ! -f "${serverfiles}/steamclient.so" ]; then + fixname="steamclient.so x86" + fn_fix_msg_start + if [ -f "${HOME}/.steam/steamcmd/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}" + elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then + cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/steamclient.so" >> "${lgsmlog}" + fi + fn_fix_msg_end + fi +fi diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh index 6230f7b46..00b9d675d 100644 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -15,8 +15,6 @@ if [ "${shortname}" == "hw" ]; then cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux32/steamclient.so" ]; then cp "${steamcmddir}/linux32/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${lgsmlog}" - else - : fi fn_fix_msg_end fi @@ -27,8 +25,6 @@ if [ "${shortname}" == "hw" ]; then cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" elif [ -f "${steamcmddir}/linux64/steamclient.so" ]; then cp "${steamcmddir}/linux64/steamclient.so" "${serverfiles}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${lgsmlog}" - else - : fi fn_fix_msg_end fi