Daniel Gibbs пре 10 година
родитељ
комит
5d6cf92630

+ 3 - 14
functions/check.sh

@@ -7,17 +7,8 @@ lgsm_version="170216"
 # Description: Overall function for managing checks.
 # Description: Overall function for managing checks.
 # Runs checks that will either halt on or fix an issue.
 # Runs checks that will either halt on or fix an issue.
 
 
-array_contains () {
-	local seeking=$1; shift
-	local in=1
-	for element; do
-		if [ ${element} == ${seeking} ]; then
-			in=0
-			break
-		fi
-	done
-	return $in
-}
+# Every command that requires checks just references check.sh
+# check.sh selects which checks to run by using arrays
 
 
 check_root.sh
 check_root.sh
 
 
@@ -53,9 +44,7 @@ local allowed_commands_array=( update_check.sh command_debug.sh command_start.sh
 for allowed_command in "${allowed_commands_array[@]}"
 for allowed_command in "${allowed_commands_array[@]}"
 do
 do
 	if [ "${allowed_command}" == "${function_selfname}" ]; then
 	if [ "${allowed_command}" == "${function_selfname}" ]; then
-		if [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Unreal Tournament 2004" ]||[ "${gamename}" == "Mumble" ]||[ "${gamename}" == "Teamspeak 3" ]; then
-			: # These servers do not require SteamCMD. Check is skipped.
-		else
+		if [ -n "${appid}" ]; then
 			check_steamcmd.sh
 			check_steamcmd.sh
 		fi
 		fi
 	fi
 	fi

+ 3 - 0
functions/command_install.sh

@@ -4,6 +4,9 @@
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
 lgsm_version="260216"
 lgsm_version="260216"
 
 
+# Description: Overall function for the installer.
+
+
 local modulename="Install"
 local modulename="Install"
 function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
 

+ 2 - 2
functions/email.sh

@@ -55,11 +55,11 @@ fn_parms
 }| sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee "${scriptlogdir}/${servicename}-email.log" > /dev/null 2>&1
 }| sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"| tee "${scriptlogdir}/${servicename}-email.log" > /dev/null 2>&1
 echo -e "\n\n	Script log\n===================" >> "${emaillog}"
 echo -e "\n\n	Script log\n===================" >> "${emaillog}"
 tail -25 "${scriptlog}" >> "${emaillog}"
 tail -25 "${scriptlog}" >> "${emaillog}"
-if [ ! -z "${consolelog}" ]; then
+if [ -n "${consolelog}" ]; then
 	echo -e "\n\n	Console log\n====================" >> "${emaillog}"
 	echo -e "\n\n	Console log\n====================" >> "${emaillog}"
 	tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' >> "${emaillog}"
 	tail -25 "${consolelog}" | awk '{ sub("\r$", ""); print }' >> "${emaillog}"
 fi
 fi
-if [ ! -z "${gamelogdir}" ]; then
+if [ -n "${gamelogdir}" ]; then
 	echo -e "\n\n	Server log\n====================" >> "${emaillog}"
 	echo -e "\n\n	Server log\n====================" >> "${emaillog}"
 	tail "${gamelogdir}"/* | grep -v "==>" | sed '/^$/d' | tail -25 >> "${emaillog}"
 	tail "${gamelogdir}"/* | grep -v "==>" | sed '/^$/d' | tail -25 >> "${emaillog}"
 fi
 fi

+ 1 - 1
functions/fix.sh

@@ -29,7 +29,7 @@ fn_fix_msg_end(){
 
 
 # Fixes that are run on start
 # Fixes that are run on start
 if [ "${function_selfname}" != "command_install.sh" ]; then
 if [ "${function_selfname}" != "command_install.sh" ]; then
-	if [ ! -z "${appid}" ]; then
+	if [ -n "${appid}" ]; then
 		fix_steamcmd.sh
 		fix_steamcmd.sh
 	fi	
 	fi	
 
 

+ 2 - 0
functions/fix_dst.sh

@@ -4,6 +4,8 @@
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
 lgsm_version="010316"
 lgsm_version="010316"
 
 
+# Description: Resolves various issues with Dont Starve together.
+
 # Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer)
 # 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.
 # 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
 if [ -f "/etc/redhat-release" ] && [ ! -f "${filesdir}/bin/lib32/libcurl-gnutls.so.4" ]; then

+ 2 - 0
functions/fix_ro.sh

@@ -4,6 +4,8 @@
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
 lgsm_version="010316"
 lgsm_version="010316"
 
 
+# Description: Resolves various issues with red orchestra.
+
 echo "Applying WebAdmin ROOst.css fix."
 echo "Applying WebAdmin ROOst.css fix."
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ROOst.css"
 sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ROOst.css"

+ 0 - 1
functions/fix_steamcmd.sh

@@ -26,7 +26,6 @@ if [ "${gamename}" == "Serious Sam 3: BFE" ]; then
 	fi
 	fi
 elif [ "${gamename}" == "Hurtworld" ]; then
 elif [ "${gamename}" == "Hurtworld" ]; then
 	# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
 	# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
-
 	if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
 	if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
 		fixname="steamclient.so x86"
 		fixname="steamclient.so x86"
 		fn_fix_msg_start
 		fn_fix_msg_start

+ 2 - 0
functions/fix_ut2k4.sh

@@ -4,6 +4,8 @@
 # Website: http://gameservermanagers.com
 # Website: http://gameservermanagers.com
 lgsm_version="010316"
 lgsm_version="010316"
 
 
+# Description: Resolves various issues with unreal tournament 2004.
+
 echo "applying WebAdmin ut2003.css fix."
 echo "applying WebAdmin ut2003.css fix."
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 echo "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
 sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ut2003.css"
 sed -i 's/none}/none;/g' "${filesdir}/Web/ServerAdmin/ut2003.css"