mirror of
https://github.com/Icinga/icinga2.git
synced 2025-08-21 01:28:21 +02:00
In contrast to the regular `kill` binary, `icinga2 internal signal` drops permissions before sending the signal. This is important as the PID file can be written by the Icinga user, dropping the permissions prevents that user from using this to send signals to processes it is not supposed to signal. SIGUSR1 wasn't among the list of signals supported by `icinga2 internal signal`, so it is added there.
22 lines
532 B
CMake
22 lines
532 B
CMake
@ICINGA2_LOGDIR@/icinga2.log @ICINGA2_LOGDIR@/debug.log {
|
|
daily
|
|
rotate 7@LOGROTATE_USE_SU@
|
|
compress
|
|
delaycompress
|
|
missingok
|
|
notifempty@LOGROTATE_CREATE@
|
|
postrotate
|
|
@CMAKE_INSTALL_FULL_SBINDIR@/icinga2 internal signal --sig SIGUSR1 --pid "$(cat @ICINGA2_INITRUNDIR@/icinga2.pid 2> /dev/null)" 2> /dev/null || true
|
|
endscript
|
|
}
|
|
|
|
@ICINGA2_LOGDIR@/error.log {
|
|
daily
|
|
rotate 90@LOGROTATE_USE_SU@
|
|
compress
|
|
delaycompress
|
|
missingok
|
|
notifempty@LOGROTATE_CREATE@
|
|
# TODO: figure out how to get Icinga to re-open this log file
|
|
}
|