فهرست منبع

Fix for centos servers

Daniel Gibbs 10 سال پیش
والد
کامیت
b5c549f55e
3فایلهای تغییر یافته به همراه52 افزوده شده و 2 حذف شده
  1. 6 1
      functions/core_functions.sh
  2. 3 1
      functions/fix.sh
  3. 43 0
      functions/fix_dst.sh

+ 6 - 1
functions/core_functions.sh

@@ -2,7 +2,7 @@
 # LGSM core_functions.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-lgsm_version="271215"
+lgsm_version="020216"
 
 # Description: Defines all functions to allow download and execution of functions using fn_runfunction.
 # This function is called first before any other function. Without this file other functions would not load.
@@ -180,6 +180,11 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
+fix_dst.sh(){
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
 fix_ins.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction

+ 3 - 1
functions/fix.sh

@@ -2,7 +2,7 @@
 # LGSM fix.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
-lgsm_version="010116"
+lgsm_version="020116"
 
 # Description: Overall function for managing fixes.
 # Runs functions that will fix an issue.
@@ -16,6 +16,8 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
 	if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 		startfix=1
 		fix_csgo.sh
+	if [ "${gamename}" == "Don't Starve Together" ]; then
+		fix_dst.sh		
 	elif [ "${gamename}" == "Insurgency" ]; then
 		fix_ins.sh
 	elif [ "${gamename}" == "ARMA 3" ]; then

+ 43 - 0
functions/fix_dst.sh

@@ -0,0 +1,43 @@
+#!/bin/bash
+# LGSM fix_dst.sh function
+# Author: Daniel Gibbs
+# Website: http://gameservermanagers.com
+lgsm_version="020116"
+
+# Fixes line 63: 20150 Segmentation fault (core dumped) #488
+
+fn_msg_start(){
+	fn_printdots "Applying ${fixname} fix: ${gamename}"
+	sleep 1
+	fn_printinfo "Applying ${fixname} fix: ${gamename}"
+	fn_scriptlog "Applying ${fixname} fix: ${gamename}"
+	sleep 1
+}
+
+fn_msg_end(){
+	if [ $? -ne 0 ]; then
+		fn_printfailnl "Applying ${fixname} fix: ${gamename}"
+		fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}"
+	else
+		fn_printoknl "Applying ${fixname} fix: ${gamename}"
+		fn_scriptlog "Complete! Applying ${fixname} fix: ${gamename}"
+	fi	
+}
+
+# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer)
+# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.
+if [ -f "/etc/redhat-release" ] && [ ! -f "${filesdir}/bin/lib32/libcurl-gnutls.so.4" ]; then
+	local fixname="libcurl-gnutls.so.4 missing"
+	fn_msg_start
+	echo -e "downloading libcurl-gnutls.so.4...\c"
+	curl=$(curl --fail -o "${filesdir}/bin/lib32" "https://github.com/dgibbs64/linuxgsm/raw/master/DontStarveTogether/dependencies/libcurl-gnutls.so.4" 2>&1)
+	if [ $? -ne 0 ]; then
+		echo -e "\e[0;31mFAIL\e[0m\n"
+		echo "${curl}"
+		echo -e "${githuburl}\n"
+		exit
+	else
+		echo -e "\e[0;32mOK\e[0m"
+	fi	
+	fn_msg_end
+fi