Skip to content
Snippets Groups Projects
Commit 96c37d73 authored by Alexey Golubev's avatar Alexey Golubev
Browse files

Fix log rotation

parent 26f7126c
No related branches found
No related tags found
No related merge requests found
...@@ -259,6 +259,10 @@ update_log_settings(){ ...@@ -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 ...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment