فهرست منبع

fix(csserver): fix missing steamclient.so (#3030)

Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
Christian 5 سال پیش
والد
کامیت
fa5a668997
4فایلهای تغییر یافته به همراه28 افزوده شده و 4 حذف شده
  1. 5 0
      lgsm/functions/core_functions.sh
  2. 2 0
      lgsm/functions/fix.sh
  3. 21 0
      lgsm/functions/fix_cs.sh
  4. 0 4
      lgsm/functions/fix_hw.sh

+ 5 - 0
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

+ 2 - 0
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

+ 21 - 0
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

+ 0 - 4
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