Browse Source

Renamed all functions test required now

Daniel Gibbs 10 năm trước cách đây
mục cha
commit
f005da0fe8
58 tập tin đã thay đổi với 543 bổ sung606 xóa
  1. 2 2
      functions/check.sh
  2. 1 1
      functions/check_ip.sh
  3. 2 2
      functions/check_logs.sh
  4. 1 1
      functions/check_steamcmd.sh
  5. 1 1
      functions/check_steamuser.sh
  6. 1 1
      functions/check_tmux.sh
  7. 1 1
      functions/command_backup.sh
  8. 3 3
      functions/command_console.sh
  9. 0 67
      functions/command_debug
  10. 8 8
      functions/command_debug.sh
  11. 174 174
      functions/command_details.sh
  12. 22 22
      functions/command_install.sh
  13. 14 14
      functions/command_monitor.sh
  14. 20 20
      functions/command_start.sh
  15. 9 9
      functions/command_stop.sh
  16. 6 6
      functions/command_validate.sh
  17. 1 1
      functions/compress_unreal2_maps.sh
  18. 1 1
      functions/compress_ut99_maps.sh
  19. 59 55
      functions/core_functions.sh
  20. 74 74
      functions/core_getopt.sh
  21. 1 1
      functions/dev_debug.sh
  22. 3 3
      functions/email.sh
  23. 3 3
      functions/email_test.sh
  24. 1 1
      functions/fix_arma3.sh
  25. 3 3
      functions/fix_csgo.sh
  26. 1 1
      functions/fix_glibc.sh
  27. 1 1
      functions/fix_ins.sh
  28. 1 1
      functions/info_config.sh
  29. 2 2
      functions/info_distro.sh
  30. 1 1
      functions/info_glibc.sh
  31. 1 1
      functions/info_ts3status.sh
  32. 1 1
      functions/install_complete.sh
  33. 1 1
      functions/install_config.sh
  34. 3 3
      functions/install_dl_ut2k4.sh
  35. 1 1
      functions/install_dl_ut99.sh
  36. 5 5
      functions/install_fix_kf.sh
  37. 5 5
      functions/install_fix_ro.sh
  38. 1 1
      functions/install_fix_steam.sh
  39. 5 5
      functions/install_fix_ut2k4.sh
  40. 1 1
      functions/install_fix_ut99.sh
  41. 1 1
      functions/install_gslt.sh
  42. 1 1
      functions/install_gsquery.sh
  43. 1 1
      functions/install_header.sh
  44. 1 1
      functions/install_logs.sh
  45. 1 1
      functions/install_retry.sh
  46. 1 1
      functions/install_serverdir.sh
  47. 11 11
      functions/install_serverfiles.sh
  48. 2 2
      functions/install_ts3
  49. 2 2
      functions/install_ut2k4.sh
  50. 1 1
      functions/install_ut2k4_key.sh
  51. 2 2
      functions/install_ut99.sh
  52. 1 1
      functions/logs.sh
  53. 5 5
      functions/monitor_gsquery.sh
  54. 29 29
      functions/update_check.sh
  55. 4 4
      functions/update_dl.sh
  56. 1 1
      functions/update_functions.sh
  57. 22 22
      tests/tests_jc2server.sh
  58. 16 16
      tests/tests_ts3server.sh

+ 2 - 2
functions/check.sh

@@ -23,7 +23,7 @@ fi
 no_check_logs=( debug details install map-compressor )
 fn_module_compare "${cmd}" "${no_check_logs[@]}"
 if [ $? != 0 ]; then
-	fn_check_logs
+	check_logs.sh
 fi
 
 check_ip=( debug )
@@ -45,4 +45,4 @@ if [ $? != 0 ]; then
 	check_tmux.sh
 fi
 
-#fn_check_ts3status # may need to move out of checks
+#check_ts3status.sh # may need to move out of checks

+ 1 - 1
functions/check_ip.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_ip function
+# LGSM check_ip.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 2 - 2
functions/check_logs.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_logs function
+# LGSM check_logs.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -13,5 +13,5 @@ if [ ! -d "${scriptlogdir}" ]; then
 	fn_printinfo "Checking for log files: Creating log files"
 	echo -en "\n"
 	checklogs=1
-	fn_install_logs
+	install_logs.sh
 fi

+ 1 - 1
functions/check_steamcmd.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_steamcmd function
+# LGSM check_steamcmd.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/check_steamuser.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_steamuser function
+# LGSM check_steamuser.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/check_tmux.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_tmux function
+# LGSM check_tmux.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/command_backup.sh

@@ -34,7 +34,7 @@ if [ "${tmuxwc}" -eq 1 ]; then
 	while true; do
 		read -p "Stop ${servicename} while running the backup? [y/N]" yn
 		case $yn in
-		[Yy]* ) fn_stop; break;;
+		[Yy]* ) command_stop.sh; break;;
 		[Nn]* ) break;;
 		* ) echo "Please answer yes or no.";;
 	esac

+ 3 - 3
functions/command_console.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_console function
+# LGSM command_console.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -26,7 +26,7 @@ esac
 done
 fn_printdots "Starting"
 sleep 1
-fn_check_tmux
+check_tmux.sh
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 if [ "${tmuxwc}" -eq 1 ]; then
 	fn_printoknl "Starting"
@@ -40,7 +40,7 @@ else
 	while true; do
 		read -p "Do you want to start the server? [y/N]" yn
 		case $yn in
-		[Yy]* ) fn_start; break;;
+		[Yy]* ) command_start.sh; break;;
 		[Nn]* ) break;;
 		* ) echo "Please answer yes or no.";;
 	esac

+ 0 - 67
functions/command_debug

@@ -1,67 +0,0 @@
-#!/bin/bash
-# LGSM fn_debug function
-# Author: Daniel Gibbs
-# Website: http://gameservermanagers.com
-lgsm_version="061115"
-
-# Description: Runs the server without tmux. Runs direct from the terminal.
-local cmd="debug"
-local modulename="Debug"
-check.sh
-fn_check_ip
-fn_check_logs
-fn_details_distro
-fn_parms
-echo ""
-echo "${gamename} Debug"
-echo "============================"
-echo ""
-echo -e "Distro: ${os}"
-echo -e "Arch: ${arch}"
-echo -e "Kernel: ${kernel}"
-echo -e "Hostname: $HOSTNAME"
-echo ""
-echo "Start parameters:"
-if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
-	echo "${executable} ${parms} -debug"
-else
-	echo "${executable} ${parms}"
-fi
-echo ""
-echo -e "Use for identifying server issues only!"
-echo -e "Press CTRL+c to drop out of debug mode."
-fn_printwarningnl "If ${servicename} is already running it will be stopped."
-echo ""
-while true; do
-	read -e -i "y" -p "Continue? [Y/n]" yn
-	case $yn in
-	[Yy]* ) break;;
-	[Nn]* ) echo Exiting; return;;
-	* ) echo "Please answer yes or no.";;
-esac
-done
-fn_scriptlog "Starting debug"
-fn_printinfonl "Stopping any running servers"
-fn_scriptlog "Stopping any running servers"
-sleep 1
-fn_stop
-fn_printdots "Starting debug"
-sleep 1
-fn_printok "Starting debug"
-fn_scriptlog "Started debug"
-sleep 1
-echo -en "\n"
-cd "${executabledir}"
-if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
-	if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
-		startfix=1
-		fn_csgofix
-	elif [ "${gamename}" == "Insurgency" ]; then
-		fn_insfix
-	elif [ "${gamename}" == "ARMA 3" ]; then
-		fn_arma3fix	
-	fi
-	${executable} ${parms} -debug
-else
-	${executable} ${parms}
-fi

+ 8 - 8
functions/command_debug.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_debug function
+# LGSM command_debug.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -9,9 +9,9 @@ lgsm_version="061115"
 local modulename="Debug"
 check_root.sh
 fn_check_systemdir
-fn_check_ip
-fn_check_logs
-fn_details_distro
+check_ip.sh
+check_logs.sh
+info_distro.sh
 fn_parms
 echo ""
 echo "${gamename} Debug"
@@ -45,7 +45,7 @@ fn_scriptlog "Starting debug"
 fn_printinfonl "Stopping any running servers"
 fn_scriptlog "Stopping any running servers"
 sleep 1
-fn_stop
+command_stop.sh
 fn_printdots "Starting debug"
 sleep 1
 fn_printok "Starting debug"
@@ -56,11 +56,11 @@ cd "${executabledir}"
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 	if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 		startfix=1
-		fn_csgofix
+		fix_csgo.sh
 	elif [ "${gamename}" == "Insurgency" ]; then
-		fn_insfix
+		fix_ins.sh
 	elif [ "${gamename}" == "ARMA 3" ]; then
-		fn_arma3fix	
+		fix_arma3.sh	
 	fi
 	${executable} ${parms} -debug
 else

+ 174 - 174
functions/command_details.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_details function
+# LGSM command_details.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="211215"
@@ -9,7 +9,7 @@ lgsm_version="211215"
 # Standard Details
 # This applies to all engines
 
-fn_details_os(){
+command_details.sh_os(){
 echo -e ""
 echo -e "\e[93mDistro Details\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -23,7 +23,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 }
 
-fn_details_performance(){
+command_details.sh_performance(){
 echo -e ""
 echo -e "\e[93mPerformance\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -39,7 +39,7 @@ echo -e ""
 } | column -s $'\t' -t 
 }
 
-fn_details_disk(){
+command_details.sh_disk(){
 echo -e ""
 echo -e "\e[93mStorage\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -55,7 +55,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 }
 
-fn_details_gameserver(){
+command_details.sh_gameserver(){
 echo -e ""
 
 ## server details
@@ -105,7 +105,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 
 	# online status
 	if [ "${gamename}" == "Teamspeak 3" ]; then
-		fn_check_ts3status
+		check_ts3status.sh
 		if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ]; then
 			echo -e "\e[34mStatus:\t\e[0;31mOFFLINE\e[0m"
 		else
@@ -180,7 +180,7 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 } | column -s $'\t' -t 
 }
 
-fn_details_backup(){
+command_details.sh_backup(){
 echo -e ""
 echo -e "\e[92mBackups\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -197,14 +197,14 @@ else
 fi
 }
 
-fn_details_commandlineparms(){
+command_details.sh_commandlineparms(){
 echo -e ""
 echo -e "\e[92mCommand-line Parameters\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 echo -e "${executable} ${parms}"
 }
 
-fn_details_statusbottom(){
+command_details.sh_statusbottom(){
 echo -e ""
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ]; then
@@ -225,15 +225,15 @@ echo -e ""
 
 # Engine Specific details
 
-fn_details_avalanche(){
-fn_check_ip
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
+command_details.sh_avalanche(){
+check_ip.sh
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -248,18 +248,18 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_dontstarve(){
-fn_check_ip
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
+command_details.sh_dontstarve(){
+check_ip.sh
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -274,18 +274,18 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_projectzomboid(){
-fn_check_ip
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
+command_details.sh_projectzomboid(){
+check_ip.sh
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -300,21 +300,21 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\tudp"
 } | column -s $'\t' -t 
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
 
-fn_details_realvirtuality(){
-fn_check_ip
+command_details.sh_realvirtuality(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -335,20 +335,20 @@ fi
 	echo -e "> Steam: Master traffic\tINBOUND\t${masterport}\tudp"
 } | column -s $'\t' -t 
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_seriousengine35(){
-fn_check_ip
+command_details.sh_seriousengine35(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -364,20 +364,20 @@ echo -e ""
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 } | column -s $'\t' -t 
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_source(){
-fn_check_ip
+command_details.sh_source(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -396,20 +396,20 @@ echo -e ""
 	echo -e "< Client\tOUTBOUND\t${clientport}\tudp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_spark(){
-fn_check_ip
+command_details.sh_spark(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -434,20 +434,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_starbound(){
-fn_check_ip
+command_details.sh_starbound(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -464,19 +464,19 @@ echo -e ""
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 
 }
 
-fn_details_teamspeak3(){
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+command_details.sh_teamspeak3(){
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -493,20 +493,20 @@ echo -e ""
 	echo -e "> File transfer\tINBOUND\t${fileport}\ttcp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_teeworlds(){
-fn_check_ip
+command_details.sh_teeworlds(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -521,20 +521,20 @@ echo -e ""
 	echo -e "> Game\tINBOUND\t${port}\ttcp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_terraria(){
-fn_check_ip
+command_details.sh_terraria(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -551,20 +551,20 @@ echo -e ""
 	echo -e "> Rcon\tINBOUND\t${rconport}\ttcp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_unity3d(){
-fn_check_ip
+command_details.sh_unity3d(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -598,20 +598,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mTelnet password:\t\e[0m${telnetpass}"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_unreal(){
-fn_check_ip
+command_details.sh_unreal(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -655,20 +655,20 @@ printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
 	echo -e "\e[34mWebAdmin password:\t\e[0m${webadminpass}"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
-fn_details_ark(){
-fn_check_ip
+command_details.sh_ark(){
+check_ip.sh
 fn_parms
-fn_details_config
-fn_details_distro
-fn_details_os
-fn_details_performance
-fn_details_disk
-fn_details_gameserver
-fn_details_backup
-fn_details_commandlineparms
+info_config.sh
+info_distro.sh
+command_details.sh_os
+command_details.sh_performance
+command_details.sh_disk
+command_details.sh_gameserver
+command_details.sh_backup
+command_details.sh_commandlineparms
 echo -e ""
 echo -e "\e[92mPorts\e[0m"
 printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
@@ -684,7 +684,7 @@ echo -e ""
 	echo -e "> Query\tINBOUND\t${queryport}\tudp"
 } | column -s $'\t' -t
 
-fn_details_statusbottom
+command_details.sh_statusbottom
 }
 
 if [ ! -e "${servercfgfullpath}" ]; then
@@ -701,36 +701,36 @@ if [ ! -e "${servercfgfullpath}" ]; then
 	echo -en "   \r"
 fi
 
-fn_details_glibc
+command_details.sh_glibc
 
 if [ "${engine}" == "avalanche" ]; then
-	fn_details_avalanche
+	command_details.sh_avalanche
 elif [ "${engine}" == "dontstarve" ]; then
-		fn_details_dontstarve
+		command_details.sh_dontstarve
 elif [ "${engine}" == "projectzomboid" ]; then
-	fn_details_projectzomboid
+	command_details.sh_projectzomboid
 elif [ "${engine}" == "realvirtuality" ]; then
-	fn_details_realvirtuality
+	command_details.sh_realvirtuality
 elif [ "${engine}" == "seriousengine35" ]; then
-	fn_details_seriousengine35
+	command_details.sh_seriousengine35
 elif [ "${engine}" == "source" ] || [ "${engine}" == "goldsource" ]; then
-	fn_details_source
+	command_details.sh_source
 elif [ "${engine}" == "spark" ]; then
-	fn_details_spark
+	command_details.sh_spark
 elif [ "${engine}" == "starbound" ]; then
-	fn_details_starbound
+	command_details.sh_starbound
 elif [ "${engine}" == "teeworlds" ]; then
-	fn_details_teeworlds
+	command_details.sh_teeworlds
 elif [ "${engine}" == "terraria" ]; then
-	fn_details_terraria
+	command_details.sh_terraria
 elif [ "${engine}" == "unity3d" ]; then
-	fn_details_unity3d
+	command_details.sh_unity3d
 elif [ "${engine}" == "unreal" ] || [ "${engine}" == "unreal2" ]; then
-	fn_details_unreal
+	command_details.sh_unreal
 elif [ "${gamename}" == "ARK: Survivial Evolved" ]; then
-	fn_details_ark
+	command_details.sh_ark
 elif [ "${gamename}" == "Teamspeak 3" ]; then
-	fn_details_teamspeak3
+	command_details.sh_teamspeak3
 else
 	fn_printerrornl "Unable to detect server engine."
 fi

+ 22 - 22
functions/command_install.sh

@@ -5,42 +5,42 @@
 lgsm_version="201215"
 
 check_root.sh
-fn_install_header
-fn_install_serverdir
+install_header.sh
+install_serverdir.sh
 
 # Download and install
 if [ "${gamename}" == "Unreal Tournament 2004" ]; then
-	fn_install_ut2k4filesdl
-	fn_install_ut2k4
-	fn_install_ut2k4key
+	install_dl_ut2k4.sh
+	install_ut2k4.sh
+	install_ut2k4_key.sh
 elif [ "${gamename}" == "Unreal Tournament 99" ]; then
-	fn_install_ut99filesdl
-	fn_install_ut99
+	install_dl_ut99.sh
+	install_ut99.sh
 elif [ "${gamename}" == "Teamspeak 3" ]; then
-	fn_install_ts3
+	install_ts3.sh
 elif [ ! -z "${appid}" ]; then
 	fn_install_steamcmd
-	fn_install_serverfiles
-	fn_install_steamfix
+	finstall_serverfiles.sh
+	install_steamfix.sh
 fi
 
 # Configuration
-fn_install_glibcfix
-fn_install_logs
-fn_install_gsquery
-fn_install_config
+fix_glibc.sh
+install_logs.sh
+install_gsquery.sh
+install_config.sh
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
-	fn_install_gslt
-	fn_csgofix
+	install_gslt.sh
+	fix_csgo.sh
 elif [ "${gamename}" == "Team Fortress 2" ]; then
-	fn_install_gslt
+	install_gslt.sh
 elif [ "${gamename}" == "Killing Floor" ]; then
-	fn_install_kffix
+	install_fix_kf.sh
 elif [ "${gamename}" == "Red Orchestra: Ostfront 41-45" ]; then
-	fn_install_rofix
+	install_fix_ro.sh
 elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
-	fn_install_ut2k4fix
+	install_fix_ut2k4.sh
 elif [ "${gamename}" == "Unreal Tournament 99" ]; then
-	fn_install_ut99fix
+	install_fix_ut99.sh
 fi
-fn_install_complete
+install_complete.sh

+ 14 - 14
functions/command_monitor.sh

@@ -1,18 +1,18 @@
 #!/bin/bash
-# LGSM fn_monitor function
+# LGSM command_monitor.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
 
 # Description: Monitors server by checking for running proccesses
-# then passes to fn_monitor_query.
+# then passes to monitor_gsquery.sh.
 
 local modulename="Monitor"
 
-fn_monitor_teamspeak3(){
+command_monitor.sh_teamspeak3(){
 check_root.sh
 fn_check_systemdir
-fn_logs
+logs.sh
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
@@ -27,7 +27,7 @@ fi
 fn_printdots "Checking session: CHECKING"
 fn_scriptlog "Checking session: CHECKING"
 sleep 1
-fn_check_ts3status
+check_ts3status.sh
 if [ "${ts3status}" = "Server is running" ]; then
 	fn_printok "Checking session: OK"
 	fn_scriptlog "Checking session: OK"
@@ -45,7 +45,7 @@ else
 	if [ "${emailnotification}" = "on" ]; then
 		subject="${servicename} Monitor - Restarting ${servername}"
 		actiontaken="restarted ${servername}"
-		fn_emailnotification
+		email.shnotification
 	fi
 fi
 sleep 0.5
@@ -53,11 +53,11 @@ echo -en "\n"
 fn_restart
 }
 
-fn_monitor_tmux(){
+command_monitor.sh_tmux(){
 check_root.sh
 fn_check_systemdir
-fn_check_ip
-fn_details_config
+check_ip.sh
+info_config.sh
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
@@ -83,7 +83,7 @@ if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "$
 		echo -en "\n"
 
 		if [ "${engine}" == "avalanche" ]||[ "${engine}" == "goldsource" ]||[ "${engine}" == "realvirtuality" ]||[ "${engine}" == "source" ]||[ "${engine}" == "spark" ]||[ "${engine}" == "unity3d" ]||[ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
-			fn_monitor_query
+			monitor_gsquery.sh
 		fi
 		exit $?
 	else
@@ -95,10 +95,10 @@ if [ "${updatecheck}" = "0" ]||[ "${gamename}" == "Unreal Tournament 99" ]||[ "$
 			subject="${servicename} Monitor - Starting ${servername}"
 			failurereason="${servicename} process not running"
 			actiontaken="${servicename} has been restarted"
-			fn_email
+			email.sh
 		fi
 		fn_scriptlog "Monitor is starting ${servername}"
-		fn_start
+		command_start.sh
 	fi
 else
 	fn_printinfonl "SteamCMD is currently checking for updates"
@@ -111,7 +111,7 @@ fi
 }
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
-	fn_monitor_teamspeak3
+	command_monitor.sh_teamspeak3
 else
-	fn_monitor_tmux
+	command_monitor.sh_tmux
 fi

+ 20 - 20
functions/command_start.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_start function
+# LGSM command_start.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"
@@ -8,16 +8,16 @@ lgsm_version="201215"
 
 local modulename="Starting"
 
-fn_start_teamspeak3(){
+command_start.sh_teamspeak3(){
 check_root.sh
 fn_check_systemdir
-fn_check_logs
-fn_check_ts3status
+check_logs.sh
+check_ts3status.sh
 
 if [ "${ts3status}" != "Server is running" ]; then
 	# Will check for updates is updateonstart is yes
 	if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then
-		fn_update_check
+		update_check.sh
 	fi	
 fi
 
@@ -38,7 +38,7 @@ if [ ! -e "${servercfgfullpath}" ]; then
 	touch "${servercfgfullpath}"
 fi
 
-fn_logs
+logs.sh
 
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
@@ -58,7 +58,7 @@ date > "${rootdir}/${lockselfname}"
 cd "${executabledir}"
 ./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1
 sleep 1
-fn_check_ts3status
+check_ts3status.sh
 if [ "${ts3status}" = "Server seems to have died" ] || [ "${ts3status}"	= "No server running (ts3server.pid is missing)" ]; then
 	fn_printfailnl "Unable to start ${servername}"
 	fn_scriptlog "Unable to start ${servername}"
@@ -72,39 +72,39 @@ sleep 0.5
 echo -en "\n"
 }
 
-fn_start_tmux(){
+command_start.sh_tmux(){
 check_root.sh
 fn_check_systemdir
-fn_check_ip
-fn_check_logs
+check_ip.sh
+check_logs.sh
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	startfix=1
-	fn_csgofix
+	fix_csgo.sh
 elif [ "${gamename}" == "Insurgency" ]; then
-	fn_insfix
+	fix_ins.sh
 elif [ "${gamename}" == "ARMA 3" ]; then
-	fn_arma3fix	
+	fix_arma3.sh	
 fi
 
-fn_details_config
+info_config.sh
 fn_parms
-fn_logs
+logs.sh
 
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 # Will check for updates if updateonstart is yes
 if [ "${tmuxwc}" -eq 0 ]; then
 	if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateonstart}" == "on" ]; then
-		fn_update_check
+		update_check.sh
 	fi
 fi
 
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
-fn_check_tmux
+check_tmux.sh
 
 if [ "${gamename}" != "Mumble" ]; then
-	fn_check_steamcmd
+	check_steamcmd.sh
 fi
 
 if [ "${tmuxwc}" -eq 0 ]; then
@@ -201,7 +201,7 @@ echo -en "\n"
 }
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
-	fn_start_teamspeak3
+	command_start.sh_teamspeak3
 else
-	fn_start_tmux
+	command_start.sh_tmux
 fi

+ 9 - 9
functions/command_stop.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_stop function
+# LGSM command_stop.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"
@@ -28,13 +28,13 @@ sdtd_telnet(){
     ')
 }
 
-fn_stop_teamspeak3(){
+command_stop.sh_teamspeak3(){
 check_root.sh
 fn_check_systemdir
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
-fn_check_ts3status
+check_ts3status.sh
 if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
     fn_printfail "${servername} is already stopped"
     fn_scriptlog "${servername} is already stopped"
@@ -49,14 +49,14 @@ sleep 1
 echo -en "\n"
 }
 
-fn_stop_tmux(){
+command_stop.sh_tmux(){
 check_root.sh
 fn_check_systemdir
-fn_details_config
+info_config.sh
 fn_printdots "${servername}"
 fn_scriptlog "${servername}"
 sleep 1
-fn_check_tmux
+check_tmux.sh
 
 if [ "${gamename}" == "7 Days To Die" ] ; then
     # if game is 7 Days To Die, we need special, graceful shutdown via telnet connection.
@@ -70,7 +70,7 @@ if [ "${gamename}" == "7 Days To Die" ] ; then
     # If failed using localhost will use servers ip
     refused=$(echo -en "\n ${sdtdshutdown}"| grep "Timeout or EOF")
     if [ -n "${refused}" ]; then
-        fn_check_ip
+        check_ip.sh
         telnetip=${ip}
         fn_printwarn "Attempting graceful shutdown via telnet: localhost failed"
         fn_scriptlog "Warning! Attempting graceful shutdown failed using localhost"
@@ -156,7 +156,7 @@ fi
 }
 
 if [ "${gamename}" == "Teamspeak 3" ]; then
-    fn_stop_teamspeak3
+    command_stop.sh_teamspeak3
 else
-    fn_stop_tmux
+    command_stop.sh_tmux
 fi

+ 6 - 6
functions/command_validate.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_validate function
+# LGSM command_validate.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"
@@ -9,8 +9,8 @@ lgsm_version="201215"
 local modulename="Validate"
 
 fn_validation(){
-fn_check_steamcmd
-fn_check_steamuser	
+check_steamcmd.sh
+check_steamuser.sh	
 fn_printwarn "Validating may overwrite some customised files."
 sleep 1
 echo -en "\n"
@@ -37,7 +37,7 @@ fi
 
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	echo -e '\n'
-	fn_csgofix
+	fix_csgo.sh
 fi
 fn_scriptlog "Checking complete"
 }
@@ -46,9 +46,9 @@ fn_check_root
 fn_check_systemdir
 tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 if [ "${tmuxwc}" -eq 1 ]; then
-    fn_stop
+    command_stop.sh
     fn_validation
-    fn_start
+    command_start.sh
 else
     fn_validation
 fi

+ 1 - 1
functions/compress_unreal2_maps.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_compress_unreal2maps function
+# LGSM compress_unreal2_maps.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/compress_ut99_maps.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_compress_ut99maps function
+# LGSM compress_ut99_maps.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 59 - 55
functions/core_functions.sh

@@ -7,12 +7,17 @@ lgsm_version="201215"
 # 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.
 
-fn_arma3fix(){
+fix_arma3.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_backup(){
+command_backup.sh(){
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
+check.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -32,12 +37,12 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_check_steamcmd(){
+check_steamcmd.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_check_steamuser(){
+check_steamuser.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -47,32 +52,32 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_check_tmux(){
+check_tmux.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_check_ts3status(){
+check_ts3status.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_console(){
+command_console.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_compress_unreal2maps(){
+compress_unreal2_maps.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_compress_ut99maps(){
+compress_ut99_maps.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_csgofix(){
+fix_csgo.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -82,42 +87,42 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_details(){
+command_details.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_details_config(){
+info_config.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_details_distro(){
+info_distro.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_details_glibc(){
+command_details.sh_glibc(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_debug_dev(){
+dev_debug.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_deps_detect(){
+dev_detect_deps.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_email(){
+email.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_email_test(){
+email_test.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -127,12 +132,12 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_insfix(){
+fix_ins.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_logs(){
+logs.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -142,55 +147,55 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_monitor(){
+command_monitor.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_monitor_query(){
+monitor_gsquery.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
 fn_restart(){
 local modulename="Restarting"
-fn_details_config
+info_config.sh
 fn_scriptlog "${servername}"
-fn_stop
-fn_start
+command_stop.sh
+command_start.sh
 }
 
-fn_start(){
+command_start.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_stop(){
+command_stop.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_update_check(){
+update_check.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_update_functions(){
+update_functions.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_update_dl(){
+update_dl.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_update_functions(){
+update_functions.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_validate(){
+command_validate.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
@@ -209,112 +214,111 @@ functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_complete(){
+install_complete.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_config(){
+install_config.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_glibcfix(){
+fix_glibc.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_gsquery(){
+install_gsquery.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_gslt(){
+install_gslt.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_header(){
+install_header.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_kffix(){
+install_fix_kf.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_logs(){
+install_logs.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_retry(){
+install_retry.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_rofix(){
+install_fix_ro.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_serverdir(){
+install_serverdir.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
-
-fn_install_serverfiles(){
+install_serverfiles.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_steamcmd(){
+install_steamcmd.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_steamfix(){
+install_steamfix.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ts3(){
+install_ts3.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut2k4(){
+install_ut2k4.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut2k4filesdl(){
+install_dl_ut2k4.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut2k4fix(){
+install_fix_ut2k4.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut2k4key(){
+install_ut2k4_key.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut99(){
+install_ut99.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut99filesdl(){
+install_dl_ut99.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }
 
-fn_install_ut99fix(){
+install_fix_ut99.sh(){
 functionfile="${FUNCNAME}"
 fn_runfunction
 }

+ 74 - 74
functions/core_getopt.sh

@@ -9,40 +9,40 @@ lgsm_version="061115"
 fn_getopt_generic(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	u|update)
-		fn_update_check;;
+		update_check.sh;;
 	fu|force-update|update-restart)
 		forceupdate=1;
-		fn_update_check;;
+		update_check.sh;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	v|validate)
-		fn_validate;;
+		command_validate.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	c|console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dev|dev-debug)
-		command_debug.sh_dev;;
+		dev_debug.sh;;
 	i|install)
 		fn_install;;
 	ai|auto-install)
 		fn_autoinstall;;
 	dd|depsdetect)
-		fn_deps_detect;;
+		dev_detect_deps.sh;;
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"
@@ -73,31 +73,31 @@ exit
 fn_getopt_teamspeak3(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	u|update)
-		fn_update_check;;
+		update_check.sh;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	i|install)
 		fn_install;;
 	ai|auto-install)
 		fn_autoinstall;;
 	dd|depsdetect)
-		fn_deps_detect;;
+		dev_detect_deps.sh;;
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"
@@ -124,27 +124,27 @@ exit
 fn_getopt_mumble(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	b|backup)
 		fn_backup;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dd|depsdetect)
-		fn_deps_detect;;
+		dev_detect_deps.sh;;
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"
@@ -169,40 +169,40 @@ exit
 fn_getopt_gmodserver(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	u|update)
-		fn_update_check;;
+		update_check.sh;;
 	fu|force-update|update-restart)
 		forceupdate=1;
-		fn_update_check;;
+		update_check.sh;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	v|validate)
-		fn_validate;;
+		command_validate.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	c|console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	i|install)
 		fn_install;;
 	ai|auto-install)
 		fn_autoinstall;;
 	dd|depsdetect)
-		fn_deps_detect;;
+		dev_detect_deps.sh;;
 	gc|gmod-content)
 		fn_content_gmod;;
 	*)
@@ -236,33 +236,33 @@ exit
 fn_getopt_unreal(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	c|console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	i|install)
 		fn_install;;
 	mc|map-compressor)
-		fn_compress_ut99maps;;
+		compress_ut99_maps.sh;;
 	dd|depsdetect)
-		fn_deps_detect;;		
+		dev_detect_deps.sh;;		
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"
@@ -291,42 +291,42 @@ exit
 fn_getopt_unreal2(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	u|update)
-		fn_update_check;;
+		update_check.sh;;
 	fu|force-update|update-restart)
 		forceupdate=1;
-		fn_update_check;;
+		update_check.sh;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	v|validate)
-		fn_validate;;
+		command_validate.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	c|console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	i|install)
 		fn_install;;
 	ai|auto-install)
 		fn_autoinstall;;
 	dd|depsdetect)
-		fn_deps_detect;;
+		dev_detect_deps.sh;;
 	mc|map-compressor)
-		fn_compress_unreal2maps;;
+		compress_unreal2_maps.sh;;
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"
@@ -359,33 +359,33 @@ exit
 fn_getopt_ut2k4(){
 case "$getopt" in
 	st|start)
-		fn_start;;
+		command_start.sh;;
 	sp|stop)
-		fn_stop;;
+		command_stop.sh;;
 	r|restart)
 		fn_restart;;
 	uf|update-functions)
-		fn_update_functions;;
+		update_functions.sh;;
 	m|monitor)
-		fn_monitor;;
+		command_monitor.sh;;
 	et|email-test)
-		fn_email_test;;
+		email_test.sh;;
 	d|details)
-		fn_details;;
+		command_details.sh;;
 	b|backup)
 		fn_backup;;
 	c|console)
-		fn_console;;
+		command_console.sh;;
 	d|debug)
 		command_debug.sh;;
 	dev|dev-debug)
-		command_debug.sh_dev;;		
+		dev_debug.sh;;		
 	i|install)
 		fn_install;;
 	mc|map-compressor)
-		fn_compress_ut99maps;;
+		compress_ut99_maps.sh;;
 	dd|depsdetect)
-		fn_deps_detect;;		
+		dev_detect_deps.sh;;		
 	*)
 	echo "Usage: $0 [option]"
 	echo "${gamename} - Linux Game Server Manager - Version ${version}"

+ 1 - 1
functions/dev_debug.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_debug_dev function
+# LGSM dev_debug.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 3 - 3
functions/email.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_email function
+# LGSM email.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -9,7 +9,7 @@ lgsm_version="061115"
 local modulename="Email"
 fn_printdots "Sending notification to ${email}"
 echo -en "\n"
-fn_details_distro
+info_distro.sh
 {
 	echo -e "========================================\n${servicename} details\n========================================\n"
 	echo -e "Service: ${servicename}"
@@ -27,7 +27,7 @@ fn_details_distro
 	echo -e "Avg Load${load}\n"
 	echo -e "========================================\nLogs\n========================================\n"
 	echo -e "Script log\n===================\n"
-	fn_details
+	command_details.sh
 }|sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"|tee "${scriptlogdir}/${servicename}-email.log"
 tail -25 "${scriptlog}" >> "${emaillog}"
 if [ ! -z "${consolelog}" ]; then

+ 3 - 3
functions/email_test.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_email_test function
+# LGSM email_test.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -9,13 +9,13 @@ lgsm_version="061115"
 local modulename="Email"
 check_root.sh
 fn_check_systemdir
-fn_details_config
+info_config.sh
 if [ "${emailnotification}" = "on" ]; then
 	fn_scriptlog "Sending test notification"
 	subject="${servicename} Email Test Notification - Testing ${servername}"
 	failurereason="Testing ${servicename} email notification"
 	actiontaken="Sent test email...hello is this thing on?"
-	fn_email
+	email.sh
 else
 	fn_printfailnl "Notifications not enabled"
 	fn_scriptlog "Notifications not enabled"

+ 1 - 1
functions/fix_arma3.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_arma3fix function
+# LGSM fix_arma3.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 3 - 3
functions/fix_csgo.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_csgofix function
+# LGSM fix_csgo.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -19,7 +19,7 @@ if [ ! -f "${filesdir}/steam_appid.txt" ]; then
 fi
 }
 
-fn_csgofixes(){
+fix_csgo.shes(){
 # Fixes the following error:
 # Error parsing BotProfile.db - unknown attribute 'Rank".
 if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then
@@ -84,5 +84,5 @@ fi
 if [ ! -z "${startfix}" ]; then
 	fn_csgoappfix
 else
-	fn_csgofixes
+	fix_csgo.shes
 fi

+ 1 - 1
functions/fix_glibc.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_glibcfix function
+# LGSM fix_glibc.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/fix_ins.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_insfix function
+# LGSM fix_ins.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 1 - 1
functions/info_config.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_details_config function
+# LGSM info_config.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 2 - 2
functions/info_distro.sh

@@ -1,11 +1,11 @@
 #!/bin/bash
-# LGSM fn_details_distro function
+# LGSM info_distro.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="211215"
 
 # Description: Variables providing useful info on the Operating System such as disk and performace info.
-# Used for fn_details, fn_debug and fn_email.
+# Used for command_details.sh, command_debug.sh and email.sh.
 
 ## Distro infomation
 # Returns architecture, kernel and distro/os.

+ 1 - 1
functions/info_glibc.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_details_glibc function
+# LGSM command_details.sh_glibc function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/info_ts3status.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_check_ts3status function
+# LGSM check_ts3status.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_complete.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_complete function
+# LGSM install_complete.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_config.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_config function
+# LGSM install_config.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 3 - 3
functions/install_dl_ut2k4.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut2k4filesdl function
+# LGSM install_dl_ut2k4.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -21,7 +21,7 @@ if [ "${md5check}" != "d3f28c5245c4c02802d48e4f0ffd3e34" ]; then
 	echo "MD5 checksum: FAILED!"
 	read -p "Retry download? [y/N]" yn
 	case $yn in
-	[Yy]* ) rm -fv dedicatedserver3339-bonuspack.zip; fn_install_ut2k4filesdl;;
+	[Yy]* ) rm -fv dedicatedserver3339-bonuspack.zip; install_dl_ut2k4.sh;;
 	[Nn]* ) echo Exiting; exit;;
 	* ) echo "Please answer yes or no.";;
 	esac
@@ -42,7 +42,7 @@ if [ "${md5check}" != "0fa447e05fe5a38e0e32adf171be405e" ]; then
 	echo "MD5 checksum: FAILED!"
 	read -p "Retry download? [y/N]" yn
 	case $yn in
-	[Yy]* ) rm -fv ut2004-lnxpatch3369-2.tar.bz2; fn_install_ut2k4filesdl;;
+	[Yy]* ) rm -fv ut2004-lnxpatch3369-2.tar.bz2; install_dl_ut2k4.sh;;
 	[Nn]* ) echo Exiting; exit;;
 	* ) echo "Please answer yes or no.";;
 	esac

+ 1 - 1
functions/install_dl_ut99.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut99filesdl function
+# LGSM install_dl_ut99.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 5 - 5
functions/install_fix_kf.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_kffix function
+# LGSM install_fix_kf.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -19,9 +19,9 @@ echo "applying server name fix."
 sleep 1
 echo "forcing server restart..."
 sleep 1
-fn_start
+command_start.sh
 sleep 5
-fn_stop
-fn_start
+command_stop.sh
+command_start.sh
 sleep 5
-fn_stop
+command_stop.sh

+ 5 - 5
functions/install_fix_ro.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_rofix function
+# LGSM install_fix_ro.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -19,9 +19,9 @@ echo "applying server name fix."
 sleep 1
 echo "forcing server restart..."
 sleep 1
-fn_start
+command_start.sh
 sleep 5
-fn_stop
-fn_start
+command_stop.sh
+command_start.sh
 sleep 5
-fn_stop
+command_stop.sh

+ 1 - 1
functions/install_fix_steam.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_steamfix function
+# LGSM install_steamfix.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 5 - 5
functions/install_fix_ut2k4.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut2k4fix function
+# LGSM install_fix_ut2k4.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -24,9 +24,9 @@ echo -en "forcing server restart...\r"
 sleep 0.5
 echo -en "\n"
 sleep 0.5
-fn_start
+command_start.sh
 sleep 5
-fn_stop
-fn_start
+command_stop.sh
+command_start.sh
 sleep 5
-fn_stop
+command_stop.sh

+ 1 - 1
functions/install_fix_ut99.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut99fix function
+# LGSM install_fix_ut99.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_gslt.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_gslt function
+# LGSM install_gslt.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="091215"

+ 1 - 1
functions/install_gsquery.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_gsquery function
+# LGSM install_gsquery.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_header.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_header function
+# LGSM install_header.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 1 - 1
functions/install_logs.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_logs function
+# LGSM install_logs.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_retry.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_retry function
+# LGSM install_retry.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 1 - 1
functions/install_serverdir.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_serverdir function
+# LGSM install_serverdir.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"

+ 11 - 11
functions/install_serverfiles.sh

@@ -1,13 +1,13 @@
 #!/bin/bash
-# LGSM fn_install_serverfiles function
+# LGSM finstall_serverfiles.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
 
 fn_steaminstallcommand(){
-fn_check_steamuser
+check_steamuser.sh
 counter="0"
-while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .fn_install_serverfiles.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .fn_install_serverfiles.tmp)" -ge "1" ]; do
+while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x406 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x6 .finstall_serverfiles.sh.tmp)" -ge "1" ]||[ "$(grep -wc 0x106 .finstall_serverfiles.sh.tmp)" -ge "1" ]; do
 	counter=$((counter+1))
 	cd "${rootdir}/steamcmd"
 	if [ "${counter}" -le "10" ]; then
@@ -27,7 +27,7 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)"
 		fi
 		if [ "${counter}" -ge "9" ]; then
 			rm -rf "${rootdir}/steamcmd"
-			fn_check_steamcmd
+			check_steamcmd.sh
 		fi
 
 		# Detects if unbuffer command is available.
@@ -37,15 +37,15 @@ while [ "${counter}" == "0" ]||[ "$(grep -wc 0x402 .fn_install_serverfiles.tmp)"
 
 		if [ "${counter}" -le "4" ]; then
 			if [ "${engine}" == "goldsource" ]; then
-				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
+				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" +quit |tee .finstall_serverfiles.sh.tmp
 			else
-				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .fn_install_serverfiles.tmp
+				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit |tee .finstall_serverfiles.sh.tmp
 			fi
 		elif [ "${counter}" -ge "5" ]; then
 			if [ "${engine}" == "goldsource" ]; then
-				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
+				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp
 			else
-				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
+				${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp
 			fi
 		fi
 	elif [ "${counter}" -ge "11" ]; then
@@ -61,10 +61,10 @@ if [ "${engine}" == "goldsource" ]; then
 	counter="0"
 	while [ "${counter}" -le "4" ]; do
 		counter=$((counter+1))
-		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .fn_install_serverfiles.tmp
+		${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit |tee .finstall_serverfiles.sh.tmp
 	done
 fi
-rm -f .fn_install_serverfiles.tmp
+rm -f .finstall_serverfiles.sh.tmp
 }
 
 echo ""
@@ -80,7 +80,7 @@ if [ -z "${autoinstall}" ]; then
 	read -e -i "y" -p "Was the install successful? [Y/n]" yn
 		case $yn in
 			[Yy]* ) break;;
-			[Nn]* ) fn_install_retry;;
+			[Nn]* ) install_retry.sh;;
 			* ) echo "Please answer yes or no.";;
 		esac
 	done

+ 2 - 2
functions/install_ts3

@@ -1,10 +1,10 @@
 #!/bin/bash
-# LGSM fn_install_ts3 function
+# LGSM install_ts3.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
 
-fn_details_distro
+info_distro.sh
 # Gets the teamspeak server architecture
 if [ "${arch}" == "x86_64" ]; then
 	ts3arch="amd64"

+ 2 - 2
functions/install_ut2k4.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut2k4 function
+# LGSM install_ut2k4.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -18,7 +18,7 @@ while true; do
 	read -p "Was the install successful? [y/N]" yn
 	case $yn in
 	[Yy]* ) break;;
-	[Nn]* ) fn_install_retry;;
+	[Nn]* ) install_retry.sh;;
 	* ) echo "Please answer yes or no.";;
 esac
 done

+ 1 - 1
functions/install_ut2k4_key.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut2k4key function
+# LGSM install_ut2k4_key.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 2 - 2
functions/install_ut99.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_install_ut99 function
+# LGSM install_ut99.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -18,7 +18,7 @@ while true; do
 	read -p "Was the install successful? [y/N]" yn
 	case $yn in
 	[Yy]* ) break;;
-	[Nn]* ) fn_install_retry;;
+	[Nn]* ) install_retry.sh;;
 	* ) echo "Please answer yes or no.";;
 esac
 done

+ 1 - 1
functions/logs.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_logs function
+# LGSM logs.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 5 - 5
functions/monitor_gsquery.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_monitor_query function
+# LGSM monitor_gsquery.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"
@@ -46,14 +46,14 @@ if [ -f "${rootdir}/gsquery.py" ]; then
 				sleep 30
 			fi
 			secondquery=1
-			fn_monitor_query
+			monitor_gsquery.sh
 		fi
 		if [ "${emailnotification}" = "on" ]; then
-			fn_details_config
+			info_config.sh
 			subject="${servicename} Monitor - Starting ${servername}"
 			failurereason="Failed to query ${servicename}: ${serverquery}"
 			actiontaken="restarted ${servicename}"
-			fn_email
+			email.sh
 		fi
 		fn_restart
 		exit 1
@@ -71,7 +71,7 @@ if [ -f "${rootdir}/gsquery.py" ]; then
 		echo "Attempting to resolve automatically"
 		chmod +x -v "${rootdir}/gsquery.py"
 		if [ $? -eq 0 ]; then
-			fn_monitor_query
+			monitor_gsquery.sh
 		else
 			fn_printfailure "Unable to resolve automatically. Please manually fix permissions.\n"
 			owner=$(ls -al ${rootdir}/gsquery.py|awk '{ print $3 }')

+ 29 - 29
functions/update_check.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_update_check function
+# LGSM update_check.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="201215"
@@ -49,8 +49,8 @@ if [ "${appmanifestfilewc}" -ge "2" ]; then
 		fn_printinfonl "Forcing update to correct issue"
 		fn_scriptlog "Forcing update to correct issue"
 		sleep 1
-		fn_update_dl
-		fn_update_check
+		update_dl.sh
+		update_check.sh
 	fi
 elif [ "${appmanifestfilewc}" -eq "0" ]; then
 	if [ "${forceupdate}" == "1" ]; then
@@ -65,8 +65,8 @@ elif [ "${appmanifestfilewc}" -eq "0" ]; then
 	fn_printinfonl "Forcing update to correct issue"
 	fn_scriptlog "Forcing update to correct issue"
 	sleep 1
-	fn_update_dl
-	fn_update_check
+	update_dl.sh
+	update_check.sh
 fi
 }
 
@@ -89,11 +89,11 @@ if [ "${requestrestart}" -ge "1" ]; then
 	echo -ne "\n"
 	tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 	if [ "${tmuxwc}" -eq 1 ]; then
-		fn_stop
-		fn_update_dl
-		fn_start
+		command_stop.sh
+		update_dl.sh
+		command_start.sh
 	else
-		fn_update_dl
+		update_dl.sh
 	fi
 else
 	fn_printok "Checking for update: Server logs: No update requested"
@@ -102,8 +102,8 @@ fi
 }
 
 fn_steamcmdcheck(){
-fn_check_steamcmd
-fn_check_steamuser
+check_steamcmd.sh
+check_steamuser.sh
 fn_appmanifestcheck
 # Checks for server update from SteamCMD
 fn_printdots "Checking for update: SteamCMD"
@@ -158,11 +158,11 @@ if [ "${currentbuild}" != "${availablebuild}" ]; then
 
 	tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 	if [ "${tmuxwc}" -eq 1 ]; then
-		fn_stop
-		fn_update_dl
-		fn_start
+		command_stop.sh
+		update_dl.sh
+		command_start.sh
 	else
-		fn_update_dl
+		update_dl.sh
 	fi
 else
 	echo -e "\n"
@@ -197,8 +197,8 @@ if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
 	fn_printinfonl "Checking for update: teamspeak.com: Forcing server restart"
 	fn_scriptlog "Checking for update: teamspeak.com: Forcing server restart"
 	sleep 2
-	fn_stop
-	fn_start
+	command_stop.sh
+	command_start.sh
 	sleep 2
 	# If still failing will exit
 	if [ -z "$(find ./* -name 'ts3server*_0.log')" ]; then
@@ -274,16 +274,16 @@ if [ "${currentbuilddigit}" -ne "${availablebuilddigit}" ]; then
 	fn_scriptlog "Current build: ${currentbuild}"
 	fn_scriptlog "Available build: ${availablebuild}"
 	fn_scriptlog "${currentbuild} > ${availablebuild}"
-	fn_check_ts3status
+	check_ts3status.sh
 	if [ "${ts3status}" = "No server running (ts3server.pid is missing)" ]; then
-		fn_update_dl
-		fn_start
+		update_dl.sh
+		command_start.sh
 		sleep 5
-		fn_stop
+		command_stop.sh
 	else
-		fn_stop
-		fn_update_dl
-		fn_start
+		command_stop.sh
+		update_dl.sh
+		command_start.sh
 	fi
 else
 	echo -e "\n"
@@ -297,7 +297,7 @@ else
 fi
 }
 
-fn_check_logs
+check_logs.sh
 fn_printdots "Checking for update"
 if [ "${gamename}" == "Teamspeak 3" ]; then
 	fn_teamspeak3_check
@@ -306,11 +306,11 @@ elif [ "${engine}" == "goldsource" ]||[ "${forceupdate}" == "1" ]; then
 	# forceupdate bypasses checks
 	tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -v failed|grep -Ec "^${servicename}:")
 	if [ "${tmuxwc}" -eq 1 ]; then
-		fn_stop
-		fn_update_dl
-		fn_start
+		command_stop.sh
+		update_dl.sh
+		command_start.sh
 	else
-		fn_update_dl
+		update_dl.sh
 	fi
 else
 	fn_logupdaterequest

+ 4 - 4
functions/update_dl.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_update_dl function
+# LGSM update_dl.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"
@@ -11,7 +11,7 @@ local modulename="Update"
 fn_steamcmd_dl(){
 check_root.sh
 fn_check_systemdir
-fn_details_config
+info_config.sh
 fn_printdots "Updating ${servername}"
 sleep 1
 fn_printoknl "Updating ${servername}"
@@ -34,14 +34,14 @@ fi
 
 if [ "${gamename}" == "Counter Strike: Global Offensive" ]; then
 	echo -e '\n'
-	fn_csgofix
+	fix_csgo.sh
 fi
 }
 
 fn_teamspeak3_dl(){
 check_root.sh
 fn_check_systemdir
-fn_details_config
+info_config.sh
 fn_printdots "Updating ${servername}"
 sleep 1
 fn_printoknl "Updating ${servername}"

+ 1 - 1
functions/update_functions.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-# LGSM fn_update_functions function
+# LGSM update_functions.sh function
 # Author: Daniel Gibbs
 # Website: http://gameservermanagers.com
 lgsm_version="061115"

+ 22 - 22
tests/tests_jc2server.sh

@@ -118,9 +118,9 @@ fn_setstatus(){
 		echo -ne "New status:  ${currentstatus}\\r"
     	
 		if [ "${requiredstatus}" == "ONLINE" ]; then
-			(fn_start > /dev/null 2>&1)
+			(command_start.sh > /dev/null 2>&1)
 		else
-			(fn_stop > /dev/null 2>&1)
+			(command_stop.sh > /dev/null 2>&1)
 		fi
     	if [ "${counter}" -gt "5" ]; then
     		currentstatus="FAIL"
@@ -160,7 +160,7 @@ echo "================================="
 echo "Description:"
 echo "test script reaction to missing server files."
 echo ""
-(fn_start)
+(command_start.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -196,7 +196,7 @@ echo "Description:"
 echo "start ${gamename} server."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_start
+command_start.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -207,7 +207,7 @@ echo "Description:"
 echo "start ${gamename} server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-(fn_start)
+(command_start.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -220,7 +220,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 (
 	updateonstart="on"
-	fn_start
+	command_start.sh
 )
 echo ""
 echo "Test complete!"
@@ -232,7 +232,7 @@ echo "Description:"
 echo "stop ${gamename} server."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_stop
+command_stop.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -243,7 +243,7 @@ echo "Description:"
 echo "stop ${gamename} server while already stopped."
 requiredstatus="OFFLINE"
 fn_setstatus
-(fn_stop)
+(command_stop.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -279,7 +279,7 @@ echo "Description:"
 echo "check for updates."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -292,7 +292,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_printinfonl "changed buildid to 0."
 sed -i 's/[0-9]\+/0/' ${filesdir}/steamapps/appmanifest_${appid}.acf
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -305,7 +305,7 @@ requiredstatus="ONLINE"
 fn_setstatus
 fn_printinfonl "changed buildid to 0."
 sed -i 's/[0-9]\+/0/' ${filesdir}/steamapps/appmanifest_${appid}.acf
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -318,7 +318,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_printinfonl "removed appmanifest_${appid}.acf."
 rm --verbose "${filesdir}/steamapps/appmanifest_${appid}.acf"
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -329,7 +329,7 @@ echo "Description:"
 echo "force-update bypassing update check."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -340,7 +340,7 @@ echo "Description:"
 echo "force-update bypassing update check server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -351,7 +351,7 @@ echo "Description:"
 echo "validate server files."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_validate
+command_validate.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -362,7 +362,7 @@ echo "Description:"
 echo "validate server files while server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_validate
+command_validate.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -376,7 +376,7 @@ echo "Description:"
 echo "run monitor server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -387,7 +387,7 @@ echo "Description:"
 echo "run monitor while server is offline with no lockfile."
 requiredstatus="OFFLINE"
 fn_setstatus
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -400,7 +400,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_printinfonl "creating lockfile."
 date > "${rootdir}/${lockselfname}"
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -412,10 +412,10 @@ echo "gsquery.py will fail to query port."
 requiredstatus="ONLINE"
 fn_setstatus
 sed -i 's/[0-9]\+/0/' "${servercfgfullpath}"
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 fn_printinfonl "Reseting ${servercfg}."
-fn_install_config
+install_config.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -429,7 +429,7 @@ echo "Description:"
 echo "display details."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_details
+command_details.sh
 echo ""
 echo "Test complete!"
 sleep 1

+ 16 - 16
tests/tests_ts3server.sh

@@ -101,9 +101,9 @@ fn_setstatus(){
 		echo -ne "New status:  ${currentstatus}\\r"
     	
 		if [ "${requiredstatus}" == "ONLINE" ]; then
-			(fn_start)
+			(command_start.sh)
 		else
-			(fn_stop)
+			(command_stop.sh)
 		fi
     	if [ "${counter}" -gt "5" ]; then
     		currentstatus="FAIL"
@@ -142,7 +142,7 @@ echo "================================="
 echo "Description:"
 echo "test script reaction to missing server files."
 echo ""
-(fn_start)
+(command_start.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -178,7 +178,7 @@ echo "Description:"
 echo "start ${gamename} server."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_start
+command_start.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -189,7 +189,7 @@ echo "Description:"
 echo "start ${gamename} server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-(fn_start)
+(command_start.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -202,7 +202,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 (
 	updateonstart="on"
-	fn_start
+	command_start.sh
 )
 echo ""
 echo "Test complete!"
@@ -214,7 +214,7 @@ echo "Description:"
 echo "stop ${gamename} server."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_stop
+command_stop.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -225,7 +225,7 @@ echo "Description:"
 echo "stop ${gamename} server while already stopped."
 requiredstatus="OFFLINE"
 fn_setstatus
-(fn_stop)
+(command_stop.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -261,7 +261,7 @@ echo "Description:"
 echo "check for updates."
 requiredstatus="OFFLINE"
 fn_setstatus
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -273,7 +273,7 @@ echo "change the version number tricking LGSM to update."
 requiredstatus="OFFLINE"
 sed -i 's/[0-9]\+/0/g' ${gamelogdir}/ts3server*_0.log
 fn_setstatus
-fn_update_check
+update_check.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -285,7 +285,7 @@ echo "Description:"
 echo "run monitor server while already running."
 requiredstatus="ONLINE"
 fn_setstatus
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -296,7 +296,7 @@ echo "Description:"
 echo "run monitor while server is offline with no lockfile."
 requiredstatus="OFFLINE"
 fn_setstatus
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -309,7 +309,7 @@ requiredstatus="OFFLINE"
 fn_setstatus
 fn_printinfonl "creating lockfile."
 date > "${rootdir}/${lockselfname}"
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 echo "Test complete!"
 sleep 1
@@ -321,10 +321,10 @@ echo "gsquery.py will fail to query port."
 requiredstatus="ONLINE"
 fn_setstatus
 sed -i 's/[0-9]\+/0/' "${servercfgfullpath}"
-(fn_monitor)
+(command_monitor.sh)
 echo ""
 fn_printinfonl "Reseting ${servercfg}."
-fn_install_config
+install_config.sh
 echo ""
 echo "Test complete!"
 sleep 1
@@ -338,7 +338,7 @@ echo "Description:"
 echo "display details."
 requiredstatus="ONLINE"
 fn_setstatus
-fn_details
+command_details.sh
 echo ""
 echo "Test complete!"
 sleep 1