From 96c37d7312c953cfffeaba8307f6ae4cfabc2701 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 20 Nov 2018 17:06:53 +0300 Subject: [PATCH] Fix log rotation --- run-document-server.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index 38c11b8..d8585f7 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -259,6 +259,10 @@ update_log_settings(){ ${JSON_LOG} -I -e "this.categories.default.level = '${DS_LOG_LEVEL}'" } +update_logrotate_settings(){ + sed 's|\(^su\b\).*|\1 root root|' -i /etc/logrotate.conf +} + # create base folders for i in converter docservice spellchecker metrics gc; do mkdir -p "${DS_LOG_DIR}/$i" @@ -341,6 +345,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then service supervisor start # start cron to enable log rotating + update_logrotate_settings service cron start fi