Fix logrotate configuration

refs #8868 fixes #8808
This commit is contained in:
Jean-Marcel Flach 2015-03-31 12:14:43 +02:00
parent 91da55872d
commit a28369593a
1 changed files with 8 additions and 12 deletions

View File

@ -1,30 +1,26 @@
@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/icinga2.log @CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/debug.log {
daily
@MAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/icinga2.log @CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/debug.log {
daily
rotate 7
su @ICINGA2_USER@ @ICINGA2_GROUP@
compress
delaycompress
missingok
notifempty
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
copytruncate
missingok
notifempty
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
postrotate
if ! killall -q -USR1 icinga2; then
if ! kill -l USR1 `cat @ICINGA2_RUNDIR@/icinga2/icinga2.pid`; then
exit 1
fi
endscript
endscript
}
@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/error.log {
daily
su @ICINGA2_USER@ @ICINGA2_GROUP@
rotate 90
compress
delaycompress
missingok
notifempty
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
copytruncate
# TODO: figure out how to get Icinga to re-open this log file
}