فهرست منبع

Fixed & simplified log rotation changes from my previous commit

UltimateByte 8 سال پیش
والد
کامیت
0a575f666d
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      lgsm/functions/command_start.sh

+ 7 - 5
lgsm/functions/command_start.sh

@@ -74,14 +74,16 @@ fn_start_tmux(){
 
 	# Log rotation
 	fn_script_log_info "Rotating log files"
-	if [ "${engine}" == "unreal2" ]; then
-		if [ -f "${gamelog}" ]; then
-			mv "${gamelog}" "${gamelogdate}"
-		fi
+	if [ "${engine}" == "unreal2" ]&&[ -f "${gamelog}" ]; then
+		mv "${gamelog}" "${gamelogdate}"
+	fi
+	if [ -f "${lgsmlog}" ]; then
 		mv "${lgsmlog}" "${lgsmlogdate}"
+	fi
+	if [ -f "${consolelog}" ]; then
 		mv "${consolelog}" "${consolelogdate}"
 	fi
-
+	
 	# Create lockfile
 	date > "${rootdir}/${lockselfname}"
 	cd "${executabledir}"