From 54fdd5bb9b543f33918df2595f24b7c08a1deb35 Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Fri, 20 Jul 2012 10:13:31 +0100 Subject: [PATCH] Prevent log roll error when log had not been created. --- init/msm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init/msm b/init/msm index c72df3a..6ab0aa2 100755 --- a/init/msm +++ b/init/msm @@ -1352,6 +1352,9 @@ server_log_roll() { # Moves and Gzips the logfile, a big log file slows down the # server A LOT + # Creates the server log if not already present. Prevents errors. + as_user "${SERVER_USERNAME[$1]}" "touch \"${SERVER_LOG_PATH[$1]}\"" + local log_lines="$(cat "${SERVER_LOG_PATH[$1]}" | wc -l )" if [ "$log_lines" -le '1' ]; then