Ротация логов Redmine
mkdir /var/log/redmine
systemctl stop rm-unicorn
mv /opt/redmine-3.1.3/log/* /var/log/redmine/
rm -rf /opt/redmine-3.1.3/log/
ln -s /var/log/redmine log
vi /etc/logrotate.d/redmine
/var/log/redmine/unicorn.stderr.log
/var/log/redmine//production.log
{
daily
missingok
rotate 61
compress
dateext
notifempty
# this is important if using "compress" since we need to call
# the "lastaction" script below before compressing:
delaycompress
# note the lack of the evil "copytruncate" option in this
# config. Unicorn supports the USR1 signal and we send it
# as our "lastaction" action:
lastaction
pid=/opt/redmine-3.1.3/tmp/pids/unicorn.pid
test -s $pid && kill -USR1 "$(cat $pid)"
endscript
}
systemctl start rm-unicorn
Комментариев нет:
Отправить комментарий