mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Prevent log roll error when log had not been created.
This commit is contained in:
parent
7a8a91992c
commit
54fdd5bb9b
3
init/msm
3
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
|
||||
|
Loading…
Reference in New Issue
Block a user