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.
PR 75 (commit afb6346) added support for the 'su' directive of
logrotate. However, when using 'su', we cannot chown to arbitrary file
owners anymore, which means that unless the file has already been
created with the same permissions we'll get an error.
Fix this by not using chown and su together.
- try to detect a recent logrotate version which supports the 'su'
directive (added in 3.8.0, see
5be96cf182 (diff-e4eb329834da3d36278b1b7d943b3bc9R6))
- if logrotate can't be found, assume an old version is used
- allow the parameter to be forced by the user
fixes#9249
Signed-off-by: Gunnar Beutner <gunnar@beutner.name>