4
0
Эх сурвалжийг харах

moving logfiles for games with bad log management

lrob 10 жил өмнө
parent
commit
7dcc8cb26b
1 өөрчлөгдсөн 11 нэмэгдсэн , 0 устгасан
  1. 11 0
      functions/logs.sh

+ 11 - 0
functions/logs.sh

@@ -16,6 +16,17 @@ if [ -n "${consolelog}" ]; then
 	fi
 	fi
 fi
 fi
 
 
+# For games not displaying a console, and having logs into their game folder
+if [ -n ${gamelogfile} ]; then
+	if [ -n $(find ${systemdir} -name gamelog*.log ) ]; then
+		fn_printinfo "Moving game logs to ${gamelogdir}"
+		fn_scriptlog "Moving game logs to ${gamelogdir}"
+		echo -en "\n"
+		sleep1
+		mv "${systemdir}"/gamelog*.log "${gamelogdir}"
+	fi
+fi
+
 # Log manager will start the cleanup if it finds logs older than "${logdays}"
 # Log manager will start the cleanup if it finds logs older than "${logdays}"
 if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; then
 if [ $(find "${scriptlogdir}"/ -type f -mtime +"${logdays}"|wc -l) -ne "0" ]; then
 	fn_printdots "Starting"
 	fn_printdots "Starting"