Jelajahi Sumber

Merged hotfix/ultimatebyte-0219 into master

Daniel Gibbs 9 tahun lalu
induk
melakukan
eda44c0d81
2 mengubah file dengan 10 tambahan dan 11 penghapusan
  1. 0 1
      lgsm/functions/command_console.sh
  2. 10 10
      lgsm/functions/install_logs.sh

+ 0 - 1
lgsm/functions/command_console.sh

@@ -16,7 +16,6 @@ echo ""
 if ! fn_prompt_yn "Continue?" Y; then
 	echo Exiting; return
 fi
-done
 fn_print_dots "Accessing console"
 sleep 1
 check_status.sh

+ 10 - 10
lgsm/functions/install_logs.sh

@@ -14,7 +14,7 @@ if [ "${checklogs}" != "1" ]; then
 	echo "================================="
 fi
 sleep 1
-# Create dir's for the script and console logs
+# Create script and console log directories
 mkdir -v "${rootdir}/log"
 mkdir -v "${scriptlogdir}"
 touch "${scriptlog}"
@@ -23,23 +23,23 @@ 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
+# Create gamelogdir if variable exists but directory does not
+if [ -n "${gamelogdir}" ]&&[ ! -d "${gamelogdir}" ]; then
+	mkdir -pv "${gamelogdir}"
+fi
+
+# Symlink gamelogdir to lgsm logs if variable exists
+if [ -n "${gamelogdir}" ]; then
 	if [ ! -h "${rootdir}/log/server" ]; then
 		ln -nfsv "${gamelogdir}" "${rootdir}/log/server"
 	fi
 fi
 
-# If a server is unreal2 or unity3d create a dir.
-if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then
-	mkdir -pv "${gamelogdir}"
-fi
-
-# If server uses SteamCMD create a symbolic link to the Steam logs.
+# If server uses SteamCMD create a symbolic link to the Steam logs
 if [ -d "${rootdir}/Steam/logs" ]; then
 	if [ ! -h "${rootdir}/log/steamcmd" ]; then
 		ln -nfsv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
 	fi
 fi
 sleep 1
-fn_script_log_info "Logs installed"
+fn_script_log_info "Logs installed"