Explorar o código

Merge pull request #2066 from GameServerManagers/hotfix/181027.1

hotfix/181027.1
Daniel Gibbs %!s(int64=7) %!d(string=hai) anos
pai
achega
cd9153e1bd
Modificáronse 3 ficheiros con 21 adicións e 2 borrados
  1. 2 0
      lgsm/functions/fix.sh
  2. 17 0
      lgsm/functions/fix_tf2.sh
  3. 2 2
      lgsm/functions/update_ts3.sh

+ 2 - 0
lgsm/functions/fix.sh

@@ -85,6 +85,8 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
 			fix_ut.sh
 		elif [ "${gamename}" == "Unreal Tournament 3" ]; then
 			fix_ut3.sh
+		elif [ "${gamename}" == "Team Fortress 2" ]; then
+			fix_tf2.sh
 		else
 			fn_print_information_nl "No fixes required."
 		fi

+ 17 - 0
lgsm/functions/fix_tf2.sh

@@ -0,0 +1,17 @@
+#!/bin/bash
+# LinuxGSM fix_tf2.sh function
+# Author: Vector Sigma
+# Website: https://github.com/vectorsigma
+# Description: Resolves various issues with Team Fortress 2.
+
+local commandname="FIX"
+local commandaction="Fix"
+local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062.
+if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then
+	fixname="libcurl-gnutls.so.4 missing"
+	fn_fix_msg_start
+	ln -s "/usr/lib/libcurl.so.4" "${serverfiles}/bin/libcurl-gnutls.so.4"
+	fn_fix_msg_end
+fi

+ 2 - 2
lgsm/functions/update_ts3.sh

@@ -23,8 +23,8 @@ fn_update_ts3_dl_legacy(){
 }
 
 fn_update_ts3_dl(){
-	latestmcreleaselink=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."4Netplayers.de"')
-	fn_fetch_file "${latestmcbuildurl}" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2"
+	latestts3releaselink=$(${curlpath} -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86_64.mirrors."4Netplayers.de"')
+	fn_fetch_file "${latestts3releaselink}" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2"
 	fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${ts3_version_number}.tar.bz2" "${tmpdir}"
 	echo -e "copying to ${serverfiles}...\c"
 	fn_script_log "Copying to ${serverfiles}"