mirror of https://github.com/Icinga/icinga2.git
Merge pull request #7065 from uubk/logrotate-fix
Fix logrotate "Operation not permitted"
This commit is contained in:
commit
aabfcfef9e
|
@ -148,6 +148,8 @@ if(NOT DEFINED LOGROTATE_HAS_SU)
|
|||
endif()
|
||||
if(LOGROTATE_HAS_SU)
|
||||
set(LOGROTATE_USE_SU "\n\tsu ${ICINGA2_USER} ${ICINGA2_GROUP}")
|
||||
else()
|
||||
set(LOGROTATE_CREATE "\n\tcreate 644 ${ICINGA2_USER} ${ICINGA2_GROUP}")
|
||||
endif()
|
||||
|
||||
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS context coroutine date_time filesystem thread system program_options regex REQUIRED)
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
|
||||
notifempty@LOGROTATE_CREATE@
|
||||
postrotate
|
||||
/bin/kill -USR1 $(cat @ICINGA2_INITRUNDIR@/icinga2.pid 2> /dev/null) 2> /dev/null || true
|
||||
endscript
|
||||
|
@ -17,7 +16,6 @@
|
|||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
|
||||
notifempty@LOGROTATE_CREATE@
|
||||
# TODO: figure out how to get Icinga to re-open this log file
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue