mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 05:04:30 +02:00
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()
|
endif()
|
||||||
if(LOGROTATE_HAS_SU)
|
if(LOGROTATE_HAS_SU)
|
||||||
set(LOGROTATE_USE_SU "\n\tsu ${ICINGA2_USER} ${ICINGA2_GROUP}")
|
set(LOGROTATE_USE_SU "\n\tsu ${ICINGA2_USER} ${ICINGA2_GROUP}")
|
||||||
|
else()
|
||||||
|
set(LOGROTATE_CREATE "\n\tcreate 644 ${ICINGA2_USER} ${ICINGA2_GROUP}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS context coroutine date_time filesystem thread system program_options regex REQUIRED)
|
find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS context coroutine date_time filesystem thread system program_options regex REQUIRED)
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty@LOGROTATE_CREATE@
|
||||||
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
|
|
||||||
postrotate
|
postrotate
|
||||||
/bin/kill -USR1 $(cat @ICINGA2_INITRUNDIR@/icinga2.pid 2> /dev/null) 2> /dev/null || true
|
/bin/kill -USR1 $(cat @ICINGA2_INITRUNDIR@/icinga2.pid 2> /dev/null) 2> /dev/null || true
|
||||||
endscript
|
endscript
|
||||||
@ -17,7 +16,6 @@
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
missingok
|
missingok
|
||||||
notifempty
|
notifempty@LOGROTATE_CREATE@
|
||||||
create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
|
|
||||||
# TODO: figure out how to get Icinga to re-open this log file
|
# TODO: figure out how to get Icinga to re-open this log file
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user