Просмотр исходного кода

Merge pull request #956 from dgibbs64/development

Fixes and additions (typos, pzserver, ts3server, ..)
Daniel Gibbs 9 лет назад
Родитель
Сommit
30f398e4ae
62 измененных файлов с 205 добавлено и 147 удалено
  1. 1 1
      ARKSurvivalEvolved/arkserver
  2. 23 3
      ProjectZomboid/cfg/lgsm-default.ini
  3. 3 2
      ProjectZomboid/pzserver
  4. 4 4
      TeamSpeak3/ts3server
  5. 1 1
      Teeworlds/cfg/tdm.cfg
  6. 1 1
      lgsm/functions/alert.sh
  7. 2 2
      lgsm/functions/alert_email.sh
  8. 1 1
      lgsm/functions/alert_pushbullet.sh
  9. 1 2
      lgsm/functions/check.sh
  10. 1 1
      lgsm/functions/check_config.sh
  11. 3 1
      lgsm/functions/check_deps.sh
  12. 1 1
      lgsm/functions/check_glibc.sh
  13. 2 2
      lgsm/functions/check_ip.sh
  14. 3 3
      lgsm/functions/check_logs.sh
  15. 1 1
      lgsm/functions/check_permissions.sh
  16. 1 0
      lgsm/functions/check_root.sh
  17. 2 2
      lgsm/functions/check_status.sh
  18. 4 5
      lgsm/functions/check_steamcmd.sh
  19. 1 0
      lgsm/functions/check_system_dir.sh
  20. 1 1
      lgsm/functions/command_debug.sh
  21. 4 4
      lgsm/functions/command_details.sh
  22. 1 1
      lgsm/functions/command_dev_debug.sh
  23. 1 1
      lgsm/functions/command_fastdl.sh
  24. 2 2
      lgsm/functions/command_install.sh
  25. 2 2
      lgsm/functions/command_monitor.sh
  26. 2 2
      lgsm/functions/command_restart.sh
  27. 1 1
      lgsm/functions/command_start.sh
  28. 1 1
      lgsm/functions/command_stop.sh
  29. 1 1
      lgsm/functions/command_test_alert.sh
  30. 1 1
      lgsm/functions/command_ts3_server_pass.sh
  31. 1 1
      lgsm/functions/command_update.sh
  32. 2 2
      lgsm/functions/command_update_functions.sh
  33. 6 6
      lgsm/functions/command_validate.sh
  34. 1 1
      lgsm/functions/compress_unreal2_maps.sh
  35. 1 1
      lgsm/functions/compress_ut99_maps.sh
  36. 1 1
      lgsm/functions/core_exit.sh
  37. 6 3
      lgsm/functions/core_functions.sh
  38. 7 7
      lgsm/functions/core_getopt.sh
  39. 36 24
      lgsm/functions/core_messages.sh
  40. 2 2
      lgsm/functions/core_trap.sh
  41. 1 1
      lgsm/functions/fix.sh
  42. 1 1
      lgsm/functions/fix_csgo.sh
  43. 1 1
      lgsm/functions/fix_dst.sh
  44. 1 1
      lgsm/functions/fix_glibc.sh
  45. 1 1
      lgsm/functions/fix_steamcmd.sh
  46. 1 1
      lgsm/functions/fn_functions
  47. 14 4
      lgsm/functions/info_config.sh
  48. 2 2
      lgsm/functions/info_glibc.sh
  49. 1 0
      lgsm/functions/info_parms.sh
  50. 1 0
      lgsm/functions/install_complete.sh
  51. 2 1
      lgsm/functions/install_config.sh
  52. 1 0
      lgsm/functions/install_header.sh
  53. 3 2
      lgsm/functions/install_logs.sh
  54. 1 0
      lgsm/functions/install_retry.sh
  55. 1 0
      lgsm/functions/install_server_dir.sh
  56. 4 3
      lgsm/functions/install_server_files.sh
  57. 1 0
      lgsm/functions/install_ts3db.sh
  58. 1 0
      lgsm/functions/install_ut2k4_key.sh
  59. 3 3
      lgsm/functions/monitor_gsquery.sh
  60. 1 1
      lgsm/functions/update_steamcmd.sh
  61. 14 14
      tests/tests_jc2server.sh
  62. 13 13
      tests/tests_ts3server.sh

+ 1 - 1
ARKSurvivalEvolved/arkserver

@@ -40,7 +40,7 @@ ip="0.0.0.0"
 updateonstart="off"
 
 fn_parms(){
-    parms="TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}"
+	parms="TheIsland?listen?MultiHome=${ip}?SessionName=${servername}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port}?ServerAdminPassword=${rconpassword}"
 }
 
 #### Advanced Variables ####

+ 23 - 3
ProjectZomboid/cfg/lgsm-default.ini

@@ -14,10 +14,8 @@ SafetyToggleTimer=100
 SafetyCooldownTimer=120
 SpawnItems=
 DefaultPort=16261
-ResetID=834499345
 Mods=
 Map=Muldraugh, KY
-SpawnRegions=servertest_spawnregions.lua
 DoLuaChecksum=true
 Public=false
 PublicName=pzserver
@@ -33,7 +31,7 @@ NoFireSpread=false
 NoFire=false
 AnnounceDeath=false
 MinutesPerPage=1.0
-HoursForCorpseRemoval=0
+HoursForCorpseRemoval=0.0
 SaveWorldEveryMinutes=0
 PlayerSafehouse=false
 AdminSafehouse=false
@@ -44,3 +42,25 @@ SafehouseAllowRespawn=false
 SafehouseDaySurvivedToClaim=0
 SafeHouseRemovalTime=144
 AllowDestructionBySledgehammer=true
+KickFastPlayers=false
+RCONPort=27015
+RCONPassword=
+Password=
+MaxAccountsPerUser=0
+SleepAllowed=false
+SleepNeeded=false
+SteamPort1=8766
+SteamPort2=8767
+WorkshopItems=
+SteamScoreboard=true
+SteamVAC=true
+UPnP=true
+UPnPLeaseTime=86400
+UPnPZeroLeaseTimeFallback=true
+UPnPForce=true
+CoopServerLaunchTimeout=20
+CoopMasterPingTimeout=60
+server_browser_announced_ip=
+UseTCPForMapDownloads=false
+PlayerRespawnWithSelf=false
+PlayerRespawnWithOther=false

+ 3 - 2
ProjectZomboid/pzserver

@@ -10,7 +10,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="290716"
 
 #### Variables ####
 
@@ -31,11 +31,12 @@ steamuser="anonymous"
 steampass=""
 
 # Start Variables
+adminpassword="CHANGE_ME"
 ip="0.0.0.0"
 updateonstart="off"
 
 fn_parms(){
-parms=""
+parms="-ip ${ip} -adminpassword \"${adminpassword}\""
 }
 
 #### Advanced Variables ####

+ 4 - 4
TeamSpeak3/ts3server

@@ -1,5 +1,5 @@
 #!/bin/bash
-# Teamspeak 3
+# TeamSpeak 3
 # Server Management Script
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
@@ -9,7 +9,7 @@ if [ -f ".dev-debug" ]; then
 	set -x
 fi
 
-version="210516"
+version="290716"
 
 #### Variables ####
 
@@ -29,8 +29,8 @@ pushbullettoken="accesstoken"
 updateonstart="off"
 
 # Server Details
-gamename="Teamspeak 3"
-servername="Teamspeak 3 Server"
+gamename="TeamSpeak 3"
+servername="TeamSpeak 3 Server"
 servicename="ts3-server"
 
 # Directories

+ 1 - 1
Teeworlds/cfg/tdm.cfg

@@ -1,6 +1,6 @@
 // ****************************************************************************
 //                                                                            *
-//     TeeWorlds - tdm.cfg                                                    *
+//     Teeworlds - tdm.cfg                                                    *
 //     Version 281015                                                         *
 //                                                                            *
 // ****************************************************************************

+ 1 - 1
lgsm/functions/alert.sh

@@ -28,7 +28,7 @@ fn_alert_restart_query(){
 fn_alert_update(){
 	fn_script_log_info "Sending update alert"
 	alertsubject="LGSM - Updated - ${servername}"
-	alertbody="${servicename} recieved update"
+	alertbody="${servicename} received update"
 }
 
 if [ "${alert}" == "restart" ]; then

+ 2 - 2
lgsm/functions/alert_email.sh

@@ -2,7 +2,7 @@
 # LGSM alert_email.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Sends email alert if monitor picks up a failure.
+# Description: Sends email alert including server details and logs.
 
 local commandname="ALERT"
 local commandaction="Alert"
@@ -153,7 +153,7 @@ fn_details_gameserver(){
 			echo -e "Tick rate: ${tickrate}"
 		fi
 
-		# Teamspeak dbplugin
+		# TeamSpeak dbplugin
 		if [ -n "${dbplugin}" ]; then
 			echo -e "dbplugin: ${dbplugin}"
 		fi

+ 1 - 1
lgsm/functions/alert_pushbullet.sh

@@ -2,7 +2,7 @@
 # LGSM alert_pushbullet.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: alerts using pushbullet.
+# Description: Sends Pushbullet alert including the server status.
 
 local commandname="ALERT"
 local commandaction="Alert"

+ 1 - 2
lgsm/functions/check.sh

@@ -2,7 +2,6 @@
 # LGSM check.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-
 # Description: Overall function for managing checks.
 # Runs checks that will either halt on or fix an issue.
 
@@ -63,7 +62,7 @@ done
 local allowed_commands_array=( command_console.sh command_start.sh )
 for allowed_command in "${allowed_commands_array[@]}"
 do
-	if [ "${allowed_command}" == "${function_selfname}" ]||[ "${gamename}" != "Teamspeak 3" ]; then
+	if [ "${allowed_command}" == "${function_selfname}" ]||[ "${gamename}" != "TeamSpeak 3" ]; then
 		check_tmux.sh
 	fi
 done

+ 1 - 1
lgsm/functions/check_config.sh

@@ -2,7 +2,7 @@
 # LGSM check_config.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: If server config missing warn user.
+# Description: Checks if the server config is missing and warns the user if needed.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 3 - 1
lgsm/functions/check_deps.sh

@@ -2,7 +2,7 @@
 # LGSM check_deps.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Checks that the requires dependencies are installed for LGSM.
+# Description: Checks if required dependencies are installed for LGSM.
 
 local commandname="CHECK"
 
@@ -163,6 +163,7 @@ if [ -n "$(command -v dpkg-query)" ]; then
 	# Brainbread 2 and Don't Starve Together
 	elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
 		array_deps_required+=( libcurl4-gnutls-dev:i386 )
+	# Project Zomboid
 	elif [ "${engine}" ==  "projectzomboid" ]; then
 		array_deps_required+=( openjdk-7-jre )
 	# Unreal engine
@@ -209,6 +210,7 @@ elif [ -n "$(command -v yum)" ]; then
 	# Brainbread 2 and Don't Starve Together
 	elif [ "${gamename}" == "Brainbread 2" ]||[ "${gamename}" == "Don't Starve Together" ]; then
 		array_deps_required+=( libcurl.i686 )
+	# Project Zomboid
 	elif [ "${engine}" ==  "projectzomboid" ]; then
 		array_deps_required+=( java-1.7.0-openjdk )
 	# Unreal engine

+ 1 - 1
lgsm/functions/check_glibc.sh

@@ -2,7 +2,7 @@
 # LGSM check_glibc.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Checks if server has correct glibc or has a fix available.
+# Description: Checks if the server has the correct Glibc version or a fix available.
 
 local commandname="CHECK"
 

+ 2 - 2
lgsm/functions/check_ip.sh

@@ -3,12 +3,12 @@
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
 # Description: Automatically identifies the server interface IP.
-# If multiple interfaces are detected the user will need to manualy set using ip="0.0.0.0".
+# If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0".
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-if [ "${gamename}" != "Teamspeak 3" ]; then
+if [ "${gamename}" != "TeamSpeak 3" ]; then
 	if [ ! -f "/bin/ip" ]; then
 		ipcommand="/sbin/ip"
 	else

+ 3 - 3
lgsm/functions/check_logs.sh

@@ -2,13 +2,13 @@
 # LGSM check_logs.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Checks that log files exist on server start
+# Description: Checks if log files exist.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-# Create dir's for the script and console logs
-if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "Teamspeak 3" ]; then
+# Create directories for the script and console logs
+if [ ! -d "${scriptlogdir}" ]||[ ! -d "${consolelogdir}" ]&&[ "${gamename}" != "TeamSpeak 3" ]; then
 	fn_print_dots "Checking for log files"
 	sleep 0.5
 	fn_print_info_nl "Checking for log files: Creating log files"

+ 1 - 1
lgsm/functions/check_permissions.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Checks script, files and folders ownership and permissions.
+# Description: Checks ownership & permissions of scripts, files and folders.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 1 - 0
lgsm/functions/check_root.sh

@@ -2,6 +2,7 @@
 # LGSM check_root.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Checks if the user tried to run the script as root.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 2 - 2
lgsm/functions/check_status.sh

@@ -2,12 +2,12 @@
 # LGSM check_status.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Checks the proccess status of the server. Either online or offline.
+# Description: Checks the process status of the server. Either online or offline.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-if [ "${gamename}" == "Teamspeak 3" ]; then
+if [ "${gamename}" == "TeamSpeak 3" ]; then
 	# 1: Server is running
 	# 0: Server seems to have died
 	# 0: No server running (ts3server.pid is missing)

+ 4 - 5
lgsm/functions/check_steamcmd.sh

@@ -2,7 +2,7 @@
 # LGSM check_steamcmd.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Checks SteamCMD is installed and correct.
+# Description: Checks if SteamCMD is installed correctly.
 
 local commandname="CHECK"
 
@@ -15,9 +15,8 @@ fn_install_steamcmd(){
 	chmod +x "${steamcmddir}/steamcmd.sh"
 }
 
-
 fn_check_steamcmd_user(){
-	# Checks steamuser is setup.
+	# Checks if steamuser is setup.
 	if [ "${steamuser}" == "username" ]; then
 		fn_print_fail_nl "Steam login not set. Update steamuser in ${selfname}."
 		echo "	* Change steamuser=\"username\" to a valid steam login."
@@ -59,7 +58,7 @@ fn_check_steamcmd_sh(){
 
 fn_check_steamcmd_guard(){
 	if [ "${function_selfname}" == "command_update.sh" ]||[ "${function_selfname}" == "command_validate.sh" ]; then
-		# Checks that steamcmd is working correctly and will prompt Steam Guard if required.
+		# Checks that SteamCMD is working correctly and will prompt Steam Guard if required.
 		"${steamcmddir}"/steamcmd.sh +login "${steamuser}" "${steampass}" +quit
 		if [ $? -ne 0 ]; then
 			fn_print_failure_nl "Error running SteamCMD"
@@ -69,5 +68,5 @@ fn_check_steamcmd_guard(){
 
 fn_check_steamcmd_user
 fn_check_steamcmd_sh
-# stdbuf has now replaced unbuffer. This shoudl no longer be required
+# stdbuf has now replaced unbuffer. This should not longer be required.
 #fn_check_steamcmd_guard

+ 1 - 0
lgsm/functions/check_system_dir.sh

@@ -2,6 +2,7 @@
 # LGSM check_system_dir.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Checks if systemdir is accessible.
 
 local commandname="CHECK"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 1 - 1
lgsm/functions/command_debug.sh

@@ -2,7 +2,7 @@
 # LGSM command_debug.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Runs the server without tmux. Runs direct from the terminal.
+# Description: Runs the server without tmux and directly from the terminal.
 
 local commandname="DEBUG"
 local commandaction="Debug"

+ 4 - 4
lgsm/functions/command_details.sh

@@ -150,7 +150,7 @@ fn_details_gameserver(){
 			echo -e "${blue}Tick rate:\t${default}${tickrate}"
 		fi
 
-		# Teamspeak dbplugin
+		# TeamSpeak dbplugin
 		if [ -n "${dbplugin}" ]; then
 			echo -e "${blue}dbplugin:\t${default}${dbplugin}"
 		fi
@@ -286,7 +286,7 @@ fn_details_ports(){
 	echo -e "Change ports by editing the parameters in:"
 
 	parmslocation="${red}UNKNOWN${default}"
-	local ports_edit_array=( "avalanche" "dontstarve" "projectzomboid" "idtech3" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "Teamspeak 3" "7 Days To Die" )
+	local ports_edit_array=( "avalanche" "dontstarve" "projectzomboid" "idtech3" "realvirtuality" "seriousengine35" "teeworlds" "terraria" "unreal" "unreal2" "TeamSpeak 3" "7 Days To Die" )
 	for port_edit in "${ports_edit_array[@]}"
 	do
 		if [ "${engine}" == "${port_edit}" ]||[ "${gamename}" == "${port_edit}" ]; then
@@ -569,7 +569,7 @@ fn_details_gameserver
 fn_details_script
 fn_details_backup
 # Some game servers do not have parms.
-if [ "${gamename}" != "Teamspeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
+if [ "${gamename}" != "TeamSpeak 3" ]&&[ "${engine}" != "avalanche" ]&&[ "${engine}" != "dontstarve" ]&&[ "${engine}" != "projectzomboid" ]; then
 	fn_parms
 	fn_details_commandlineparms
 fi
@@ -606,7 +606,7 @@ elif [ "${gamename}" == "Hurtworld" ]; then
 	fn_details_hurtworld
 elif [ "${gamename}" == "7 Days To Die" ]; then
 	fn_details_sdtd
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	fn_details_teamspeak3
 elif [ "${gamename}" == "Rust" ]; then
 	fn_details_rust

+ 1 - 1
lgsm/functions/command_dev_debug.sh

@@ -2,7 +2,7 @@
 # LGSM command_dev_debug.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Dev only: enables debuging log to be saved to dev-debug.log.
+# Description: Dev only: Enables debugging log to be saved to dev-debug.log.
 
 local commandname="DEV-DEBUG"
 local commandaction="Dev-Debug"

+ 1 - 1
lgsm/functions/command_fastdl.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Creates a FastDL folder
+# Description: Creates a FastDL folder.
 
 local commandname="FASTDL"
 local commandaction="FastDL"

+ 2 - 2
lgsm/functions/command_install.sh

@@ -17,7 +17,7 @@ check_deps.sh
 if [ "${gamename}" == "Unreal Tournament 2004" ]; then
 	install_server_files.sh
 	install_ut2k4_key.sh
-elif [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "Unreal Tournament 99" ]||[ "${gamename}" == "TeamSpeak 3" ]; then
 	installer=1
 	install_server_files.sh
 elif [ -n "${appid}" ]; then
@@ -29,7 +29,7 @@ fi
 install_config.sh
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]||[ "${gamename}" == "Team Fortress 2" ]||[ "${gamename}" == "BrainBread 2" ]; then
 	install_gslt.sh
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	install_ts3db.sh
 fi
 

+ 2 - 2
lgsm/functions/command_monitor.sh

@@ -2,7 +2,7 @@
 # LGSM command_monitor.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Monitors server by checking for running proccesses
+# Description: Monitors server by checking for running processes.
 # then passes to monitor_gsquery.sh.
 
 local commandname="MONITOR"
@@ -90,7 +90,7 @@ info_config.sh
 fn_monitor_check_lockfile
 fn_monitor_check_update
 fn_monitor_msg_checking
-if [ "${gamename}" == "Teamspeak 3" ]; then
+if [ "${gamename}" == "TeamSpeak 3" ]; then
 	fn_monitor_teamspeak3
 else
 	fn_monitor_tmux

+ 2 - 2
lgsm/functions/command_restart.sh

@@ -1,8 +1,8 @@
 #!/bin/bash
-# LGSM command_start.sh function
+# LGSM command_restart.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Starts the server.
+# Description: Restarts the server.
 
 local commandname="RESTART"
 local commandaction="Restarting"

+ 1 - 1
lgsm/functions/command_start.sh

@@ -177,7 +177,7 @@ if [ "${status}" == "0" ]; then
 	fi
 fi
 
-if [ "${gamename}" == "Teamspeak 3" ]; then
+if [ "${gamename}" == "TeamSpeak 3" ]; then
 	fn_start_teamspeak3
 else
 	fn_start_tmux

+ 1 - 1
lgsm/functions/command_stop.sh

@@ -239,7 +239,7 @@ fn_stop_tmux(){
 
 # checks if the server is already stopped before trying to stop.
 fn_stop_pre_check(){
-	if [ "${gamename}" == "Teamspeak 3" ]; then
+	if [ "${gamename}" == "TeamSpeak 3" ]; then
 		check_status.sh
 		if [ "${status}" == "0" ]; then
 			fn_print_info_nl "${servername} is already stopped"

+ 1 - 1
lgsm/functions/command_test_alert.sh

@@ -2,7 +2,7 @@
 # LGSM command_test_alert.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Sends a test email alert.
+# Description: Sends a test alert.
 
 local commandname="ALERT"
 local commandaction="Alert"

+ 1 - 1
lgsm/functions/command_ts3_server_pass.sh

@@ -3,7 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor : UltimateByte
 # Website: https://gameservermanagers.com
-# Description: Changes TS3 serveradmin password
+# Description: Changes TS3 serveradmin password.
 
 local commandname="TS3-CHANGE-PASS"
 local commandaction="TS3 Change Password"

+ 1 - 1
lgsm/functions/command_update.sh

@@ -13,7 +13,7 @@ sleep 0.5
 check.sh
 
 
-if [ "${gamename}" == "Teamspeak 3" ]; then
+if [ "${gamename}" == "TeamSpeak 3" ]; then
 	update_ts3.sh
 else
 	update_steamcmd.sh

+ 2 - 2
lgsm/functions/command_update_functions.sh

@@ -13,7 +13,7 @@ check.sh
 fn_script_log_info "Updating functions"
 echo -ne "\n"
 
-# Removed legecy functions dir
+# Removed legacy functions dir
 if [ -n "${rootdir}" ]; then
 	if [ -d "${rootdir}/functions/" ]; then
 		rm -rfv "${rootdir}/functions/"
@@ -26,7 +26,7 @@ if [ -n "${functionsdir}" ]; then
 		cd "${functionsdir}"
 		for functionfile in *
 		do
-			# Check curl exists and use available path
+			# Check if curl exists and use available path
 			curlpaths="$(command -v curl 2>/dev/null) $(which curl >/dev/null 2>&1) /usr/bin/curl /bin/curl /usr/sbin/curl /sbin/curl)"
 			for curlcmd in ${curlpaths}
 			do

+ 6 - 6
lgsm/functions/command_validate.sh

@@ -19,7 +19,7 @@ fn_validation(){
 
 	cd "${rootdir}/steamcmd"
 
-    if  [ $(command -v stdbuf) ]; then
+	if [ $(command -v stdbuf) ]; then
 		unbuffer="stdbuf -i0 -o0 -e0"
 	fi
 
@@ -47,11 +47,11 @@ check.sh
 check_status.sh
 if [ "${status}" != "0" ]; then
 	exitbypass=1
-    command_stop.sh
-    fn_validation
-    exitbypass=1
-    command_start.sh
+	command_stop.sh
+	fn_validation
+	exitbypass=1
+	command_start.sh
 else
-    fn_validation
+	fn_validation
 fi
 core_exit.sh

+ 1 - 1
lgsm/functions/compress_unreal2_maps.sh

@@ -2,7 +2,7 @@
 # LGSM compress_unreal2_maps.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: compresses unreal maps
+# Description: Compresses unreal maps.
 
 local commandaction="Unreal Map Compressor"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 1 - 1
lgsm/functions/compress_ut99_maps.sh

@@ -2,7 +2,7 @@
 # LGSM compress_ut99_maps.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: compresses unreal maps
+# Description: Compresses unreal maps.
 
 local commandaction="Unreal Map Compressor"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"

+ 1 - 1
lgsm/functions/core_exit.sh

@@ -2,7 +2,7 @@
 # LGSM core_exit.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: handles exiting of LGSM by running and reporting an exit code.
+# Description: Handles exiting of LGSM by running and reporting an exit code.
 
 fn_exit_dev_debug(){
 	if [ -f "${rootdir}/.dev-debug" ]; then

+ 6 - 3
lgsm/functions/core_functions.sh

@@ -5,8 +5,12 @@
 # Description: Defines all functions to allow download and execution of functions using fn_fetch_function.
 # This function is called first before any other function. Without this file other functions will not load.
 
-# Code/functions for legacy servers
+# Fix for TeamSpeak 3 scripts using gamename="Teamspeak 3"
+if [ "${gamename}" == "Teamspeak 3" ]; then 
+	gamename="TeamSpeak 3" 
+fi
 
+# Code/functions for legacy servers
 fn_functions(){
 functionfile="${FUNCNAME}"
 fn_fetch_function
@@ -17,8 +21,7 @@ functionfile="${FUNCNAME}"
 fn_fetch_function
 }
 
-
-# fn_fetch_core_dl also placed here to allow legecy servers to still download core functions
+# fn_fetch_core_dl also placed here to allow legacy servers to still download core functions
 if [ -z "${lgsmdir}" ]; then
 	lgsmdir="${rootdir}/lgsm"
 	functionsdir="${lgsmdir}/functions"

+ 7 - 7
lgsm/functions/core_getopt.sh

@@ -87,7 +87,7 @@ case "${getopt}" in
 		command_update_functions.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
@@ -142,7 +142,7 @@ case "${getopt}" in
 		command_update_functions.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	b|backup)
 		command_backup.sh;;
@@ -197,7 +197,7 @@ case "${getopt}" in
 		command_validate.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
@@ -260,7 +260,7 @@ case "${getopt}" in
 		command_update_functions.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
@@ -328,7 +328,7 @@ case "${getopt}" in
 		command_validate.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
@@ -392,7 +392,7 @@ case "${getopt}" in
 		command_update_functions.sh;;
 	m|monitor)
 		command_monitor.sh;;
-	et|test-alert)
+	ta|test-alert)
 		command_test_alert.sh;;
 	dt|details)
 		command_details.sh;;
@@ -445,7 +445,7 @@ case "${getopt}" in
 
 if [ "${gamename}" == "Mumble" ]; then
 	fn_getopt_mumble
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	fn_getopt_teamspeak3
 elif [ "${gamename}" == "Garry's Mod" ]; then
 	fn_getopt_gmodserver

+ 36 - 24
lgsm/functions/core_messages.sh

@@ -25,59 +25,71 @@ fi
 ##########
 ## Feb 28 14:56:58 ut99-server: Monitor:
 fn_script_log(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${1}" >> "${scriptlog}"
+		fi
 	fi
 }
 
 ## Feb 28 14:56:58 ut99-server: Monitor: PASS:
 fn_script_log_pass(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: PASS: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: PASS: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: PASS: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: PASS: ${1}" >> "${scriptlog}"
+		fi
 	fi
 	exitcode=0
 }
 
 ## Feb 28 14:56:58 ut99-server: Monitor: FATAL:
 fn_script_log_fatal(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: FATAL: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: FATAL: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: FATAL: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: FATAL: ${1}" >> "${scriptlog}"
+		fi
 	fi
 	exitcode=1
 }
 
 ## Feb 28 14:56:58 ut99-server: Monitor: ERROR:
 fn_script_log_error(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ERROR: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ERROR: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: ERROR: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ERROR: ${1}" >> "${scriptlog}"
+		fi
 	fi
 	exitcode=2
 }
 
 ## Feb 28 14:56:58 ut99-server: Monitor: WARN:
 fn_script_log_warn(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: WARN: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: WARN: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: WARN: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: WARN: ${1}" >> "${scriptlog}"
+		fi
 	fi
 	exitcode=3
 }
 
 ## Feb 28 14:56:58 ut99-server: Monitor: INFO:
 fn_script_log_info(){
-	if [ -n "${commandname}" ]; then
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: INFO: ${1}" >> "${scriptlog}"
-	else
-		echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: INFO: ${1}" >> "${scriptlog}"
+	if [ -d "${scriptlogdir}" ]; then
+		if [ -n "${commandname}" ]; then
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: ${commandname}: INFO: ${1}" >> "${scriptlog}"
+		else
+			echo -e "$(date '+%b %d %H:%M:%S') ${servicename}: INFO: ${1}" >> "${scriptlog}"
+		fi
 	fi
 }
 

+ 2 - 2
lgsm/functions/core_trap.sh

@@ -2,12 +2,12 @@
 # LGSM core_trap.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: handles ctrl-C trap to give an exitcode.
+# Description: Handles CTRL-C trap to give an exit code.
 
 fn_exit_trap(){
 	echo ""
 	core_exit.sh
 }
 
-# trap to give an exitcode.
+# trap to give an exit code.
 trap fn_exit_trap INT

+ 1 - 1
lgsm/functions/fix.sh

@@ -45,7 +45,7 @@ if [ "${function_selfname}" != "command_install.sh" ]; then
 		fix_arma3.sh
 	fi
 
-	if [ "${gamename}" != "Teamspeak 3" ]; then
+	if [ "${gamename}" != "TeamSpeak 3" ]; then
 		fix_glibc.sh
 	fi
 fi

+ 1 - 1
lgsm/functions/fix_csgo.sh

@@ -2,7 +2,7 @@
 # LGSM fix_csgo.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Resolves various issues with csgo.
+# Description: Resolves various issues with CS:GO.
 
 local commandname="FIX"
 local commandaction="Fix"

+ 1 - 1
lgsm/functions/fix_dst.sh

@@ -2,7 +2,7 @@
 # LGSM fix_dst.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Resolves various issues with Dont Starve together.
+# Description: Resolves various issues with Don't Starve Together.
 
 local commandname="FIX"
 local commandaction="Fix"

+ 1 - 1
lgsm/functions/fix_glibc.sh

@@ -2,7 +2,7 @@
 # LGSM fix_glibc.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Downloads required glibc files and applys teh glibc fix if required
+# Description: Downloads required Glibc files and applies the Glibc fix if required.
 
 local commandname="FIX"
 local commandaction="Fix"

+ 1 - 1
lgsm/functions/fix_steamcmd.sh

@@ -2,7 +2,7 @@
 # LGSM fix_steamcmd.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: Resolves various issues related to steamCMD.
+# Description: Resolves various issues related to SteamCMD.
 
 local commandname="FIX"
 local commandaction="Fix"

+ 1 - 1
lgsm/functions/fn_functions

@@ -4,7 +4,7 @@
 # Website: https://gameservermanagers.com
 lgsm_version="210516"
 
-# Description: Redirect to new core_functions.sh
+# Description: Redirects to new core_functions.sh
 
 core_functions.sh(){
 # Functions are defined in core_functions.sh.

+ 14 - 4
lgsm/functions/info_config.sh

@@ -70,17 +70,26 @@ fn_info_config_dontstarve(){
 fn_info_config_projectzomboid(){
 	if [ ! -f "${servercfgfullpath}" ]; then
 		servername="${unavailable}"
+		serverpassword="${unavailable}"
+		rconpassword="${unavailable}"
 		slots="${zero}"
 		port="${zero}"
+		gameworld="${unavailable}"
 	else
-		servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '=", \n')
+		servername=$(grep "PublicName=" "${servercfgfullpath}" | sed 's/PublicName=//g' | tr -d '\')
+		serverpassword=$(grep "^Password=$" "${servercfgfullpath}" | sed 's/Password=//g' | tr -d '\')
+		rconpassword=$(grep "RCONPassword=" "${servercfgfullpath}" | sed 's/RCONPassword=//g' | tr -d '\')
 		slots=$(grep "MaxPlayers=" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
 		port=$(grep "DefaultPort=" "${servercfgfullpath}" | tr -cd '[:digit:]')
+		gameworld=$(grep "Map=" "${servercfgfullpath}" | sed 's/Map=//g' | tr -d '\n')
 
 		# Not Set
 		servername=${servername:-"NOT SET"}
-		slots=${slots:-"0"}
-		port=${port:-"0"}
+		serverpassword=${serverpassword:-"NOT SET"}
+		rconpassword=${rconpassword:-"NOT SET"}
+		slots=${slots:-"NOT SET"}
+		port=${port:-"NOT SET"}
+		gameworld=${gameworld:-"NOT SET"}
 	fi
 }
 
@@ -366,7 +375,8 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 # Starbound
 elif [ "${engine}" == "starbound" ]; then
 	fn_info_config_starbound
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+# TeamSpeak 3
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	fn_info_config_teamspeak3
 # Teeworlds
 elif [ "${engine}" == "teeworlds" ]; then

+ 2 - 2
lgsm/functions/info_glibc.sh

@@ -2,7 +2,7 @@
 # LGSM info_glibc.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: stores details on servers Glibc requirements.
+# Description: Stores details on servers Glibc requirements.
 
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
@@ -68,7 +68,7 @@ elif [ "${engine}" == "unreal4" ]; then
 elif [ "${engine}" == "unity3d" ]; then
 	glibcrequired="2.15"
 	glibcfix="no"
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	glibcrequired="NOT REQUIRED"
 	glibcfix="no"
 else

+ 1 - 0
lgsm/functions/info_parms.sh

@@ -143,6 +143,7 @@ elif [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 # Teeworlds
 elif [ "${engine}" == "teeworlds" ]; then
 	fn_info_config_teeworlds
+# Terraria
 elif [ "${engine}" == "terraria" ]; then
 	fn_info_config_terraria
 # Unreal/Unreal 2 engine

+ 1 - 0
lgsm/functions/install_complete.sh

@@ -2,6 +2,7 @@
 # LGSM install_complete.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Prints installation completion message and hints.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 2 - 1
lgsm/functions/install_config.sh

@@ -2,6 +2,7 @@
 # LGSM install_config.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Creates default server configs.
 
 local commandname="INSTALL"
 local commandaction="Install"
@@ -346,7 +347,7 @@ elif [ "${gamename}" == "Starbound" ]; then
 	sleep 1
 	fn_defaultconfig
 	fn_userinputconfig
-elif [ "${gamename}" == "Teamspeak 3" ]; then
+elif [ "${gamename}" == "TeamSpeak 3" ]; then
 	echo -e "downloading lgsm-default.ini...\c"
 	wget -N /dev/null ${githuburl}/TeamSpeak3/cfg/lgsm-default.ini 2>&1 | grep -F HTTP | cut -c45- | uniq
 	sleep 1

+ 1 - 0
lgsm/functions/install_header.sh

@@ -2,6 +2,7 @@
 # LGSM install_header.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Prints installation header.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 3 - 2
lgsm/functions/install_logs.sh

@@ -2,6 +2,7 @@
 # LGSM install_logs.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Creates log directories.
 
 local commandname="INSTALL"
 local commandaction="Install"
@@ -22,8 +23,8 @@ if [ -n "${consolelogdir}" ]; then
 	touch "${consolelog}"
 fi
 
-# If a server is source or goldsource, Teamspeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
-if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]||[ "${gamename}" == "Teamspeak 3" ]||[ "${engine}" == "starbound" ]||[ "${engine}" == "projectzomboid" ]||[ "${engine}" == "unreal" ]; then
+# If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
+if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]||[ "${gamename}" == "TeamSpeak 3" ]||[ "${engine}" == "starbound" ]||[ "${engine}" == "projectzomboid" ]||[ "${engine}" == "unreal" ]; then
 	if [ ! -h "${rootdir}/log/server" ]; then
 		ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
 	fi

+ 1 - 0
lgsm/functions/install_retry.sh

@@ -2,6 +2,7 @@
 # LGSM install_retry.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Asks for installation retry after failure.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 1 - 0
lgsm/functions/install_server_dir.sh

@@ -2,6 +2,7 @@
 # LGSM install_server_dir.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Creates the server directory.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 4 - 3
lgsm/functions/install_server_files.sh

@@ -2,6 +2,7 @@
 # LGSM install_server_files.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Installs server files.
 
 local commandname="INSTALL"
 local commandaction="Install"
@@ -46,8 +47,8 @@ fn_install_server_files_steamcmd(){
 			fi
 
 			# Detects if unbuffer command is available.
-            if  [ $(command -v stdbuf) ]; then
-		            unbuffer="stdbuf -i0 -o0 -e0"
+			if [ $(command -v stdbuf) ]; then
+				unbuffer="stdbuf -i0 -o0 -e0"
 			fi
 
 			if [ "${counter}" -le "4" ]; then
@@ -92,7 +93,7 @@ echo "Installing ${gamename} Server"
 echo "================================="
 sleep 1
 
-if [ "${gamename}" == "Teamspeak 3" ]; then
+if [ "${gamename}" == "TeamSpeak 3" ]; then
 	update_ts3.sh
 elif [ -z "${appid}" ]||[ "${gamename}" == "GoldenEye: Source" ]; then
 	fn_install_server_files

+ 1 - 0
lgsm/functions/install_ts3db.sh

@@ -3,6 +3,7 @@
 # Author: Daniel Gibbs
 # Contributor: PhilPhonic
 # Website: https://gameservermanagers.com
+# Description: Installs the database server MariaDB for TeamSpeak 3.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 1 - 0
lgsm/functions/install_ut2k4_key.sh

@@ -2,6 +2,7 @@
 # LGSM install_ut2k4_key.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
+# Description: Activates ut2k4 server with given key.
 
 local commandname="INSTALL"
 local commandaction="Install"

+ 3 - 3
lgsm/functions/monitor_gsquery.sh

@@ -2,14 +2,14 @@
 # LGSM monitor_gsquery.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description: uses gsquery.py to query the server port.
-# Detects if the server has frozen with the proccess still running.
+# Description: Uses gsquery.py to query the server port.
+# Detects if the server has frozen with the process still running.
 
 local commandname="MONITOR"
 local commandaction="Monitor"
 local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
 
-# Forces legecy servers to use gsquery
+# Forces legacy servers to use gsquery
 if [ -z "${gsquery}" ]; then
 	gsquery="yes"
 fi

+ 1 - 1
lgsm/functions/update_steamcmd.sh

@@ -2,7 +2,7 @@
 # LGSM update_steamcmd.sh function
 # Author: Daniel Gibbs
 # Website: https://gameservermanagers.com
-# Description:Handles updating using steamCMD.
+# Description: Handles updating using SteamCMD.
 
 local commandname="UPDATE"
 local commandaction="Update"

+ 14 - 14
tests/tests_jc2server.sh

@@ -179,19 +179,19 @@ fn_setstatus(){
 		else
 			(command_stop.sh > /dev/null 2>&1)
 		fi
-    	if [ "${counter}" -gt "5" ]; then
-    		currentstatus="FAIL"
-    		echo "Current status:  ${currentstatus}"
-    		echo ""
-    		echo "Unable to start or stop server."
-    		exit 1
-    	fi
-    done
-    echo -ne "New status:  ${currentstatus}\\r"
-    echo -e "\n"
-    echo "Test starting:"
-    echo ""
-    sleep 0.5
+		if [ "${counter}" -gt "5" ]; then
+			currentstatus="FAIL"
+			echo "Current status:  ${currentstatus}"
+			echo ""
+			echo "Unable to start or stop server."
+			exit 1
+		fi
+	done
+	echo -ne "New status:  ${currentstatus}\\r"
+	echo -e "\n"
+	echo "Test starting:"
+	echo ""
+	sleep 0.5
 }
 
 # End of every test will expect the result to either pass or fail
@@ -465,7 +465,7 @@ echo ""
 echo "4.8 - validate - online"
 echo "================================="
 echo "Description:"
-echo "validate server files while server while already running."
+echo "validate server files while server already running."
 echo ""
 echo "Command: ./jc2server validate"
 requiredstatus="ONLINE"

+ 13 - 13
tests/tests_ts3server.sh

@@ -168,19 +168,19 @@ fn_setstatus(){
 		else
 			(command_stop.sh > /dev/null 2>&1)
 		fi
-    	if [ "${counter}" -gt "5" ]; then
-    		currentstatus="FAIL"
-    		echo "Current status:  ${currentstatus}"
-    		echo ""
-    		echo "Unable to start or stop server."
-    		exit 1
-    	fi
-    done
-    echo -ne "New status:  ${currentstatus}\\r"
-    echo -e "\n"
-    echo "Test starting:"
-    echo ""
-    sleep 0.5
+		if [ "${counter}" -gt "5" ]; then
+			currentstatus="FAIL"
+			echo "Current status:  ${currentstatus}"
+			echo ""
+			echo "Unable to start or stop server."
+			exit 1
+		fi
+	done
+	echo -ne "New status:  ${currentstatus}\\r"
+	echo -e "\n"
+	echo "Test starting:"
+	echo ""
+	sleep 0.5
 }
 
 # End of every test will expect the result to either pass or fail