Przeglądaj źródła

Added symbolic link to SteamCMD logs in logs dir

Daniel Gibbs 11 lat temu
rodzic
commit
872c51df95
1 zmienionych plików z 14 dodań i 4 usunięć
  1. 14 4
      functions/fn_loginstall

+ 14 - 4
functions/fn_loginstall

@@ -2,7 +2,7 @@
 # LGSM fn_loginstall function
 # LGSM fn_loginstall function
 # Author: Daniel Gibbs
 # Author: Daniel Gibbs
 # Website: http://danielgibbs.co.uk
 # Website: http://danielgibbs.co.uk
-# Version: 241214
+# Version: 040115
 
 
 echo ""
 echo ""
 echo "Creating log directorys"
 echo "Creating log directorys"
@@ -16,7 +16,7 @@ mkdir -v "${consolelogdir}"
 touch "${consolelog}"
 touch "${consolelog}"
 # If a server is source or goldsource create a symbolic link to the game server logs
 # If a server is source or goldsource create a symbolic link to the game server logs
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
-	if [ ! -h ${rootdir}/log/server ]; then
+	if [ ! -h "${rootdir}/log/server" ]; then
 		ln -sv "${gamelogdir}" "${rootdir}/log/server"
 		ln -sv "${gamelogdir}" "${rootdir}/log/server"
 	else
 	else
 		echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
 		echo "Symbolic link ${gamelogdir} => ${rootdir}/log/server already exists!"
@@ -24,9 +24,19 @@ if [ "${engine}" == "source" ]||[ "${engine}" == "goldsource" ]; then
 fi
 fi
 # If a server is unreal2 or unity3d create a dir
 # If a server is unreal2 or unity3d create a dir
 if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
 if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]; then
-	mkdir -pv ${gamelogdir}
+	mkdir -pv "${gamelogdir}"
 fi
 fi
 if [ "${gamename}" == "7 Days To Die" ]; then
 if [ "${gamename}" == "7 Days To Die" ]; then
-	ln -sv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
+	if [ ! -h "${gamelogdir}/output_log.txt" ]; then
+		ln -sv "${filesdir}/7DaysToDie_Data/output_log.txt" "${gamelogdir}/output_log.txt"
+	fi
+fi
+# 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 -sv "${rootdir}/Steam/logs" "${rootdir}/log/steamcmd"
+	else
+		echo "Symbolic link ${rootdir}/Steam/logs => ${rootdir}/log/steamcmd already exists!"
+	fi
 fi
 fi
 sleep 1
 sleep 1