Explorar o código

only tries to move file if exists

Daniel Gibbs %!s(int64=10) %!d(string=hai) anos
pai
achega
d5fc079b41
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lgsm/functions/command_start.sh

+ 3 - 1
lgsm/functions/command_start.sh

@@ -68,7 +68,9 @@ fn_start_tmux(){
 	if [ "${status}" == "0" ]; then
 		fn_scriptlog "Rotating log files"
 		if [ "${engine}" == "unreal2" ]; then
-			mv "${gamelog}" "${gamelogdate}"
+			if [ -f "${gamelog}" ]; then
+				mv "${gamelog}" "${gamelogdate}"
+			fi
 		fi
 		mv "${scriptlog}" "${scriptlogdate}"
 		mv "${consolelog}" "${consolelogdate}"