Fix log rotation

This commit is contained in:
Alexey Golubev 2018-11-20 17:06:53 +03:00
parent 26f7126cb0
commit 96c37d7312

@ -259,6 +259,10 @@ update_log_settings(){
${JSON_LOG} -I -e "this.categories.default.level = '${DS_LOG_LEVEL}'" ${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 # create base folders
for i in converter docservice spellchecker metrics gc; do for i in converter docservice spellchecker metrics gc; do
mkdir -p "${DS_LOG_DIR}/$i" mkdir -p "${DS_LOG_DIR}/$i"
@ -341,6 +345,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
service supervisor start service supervisor start
# start cron to enable log rotating # start cron to enable log rotating
update_logrotate_settings
service cron start service cron start
fi fi