From 7bf012ca50c579ff474f45e767e716bd4677a26e Mon Sep 17 00:00:00 2001 From: Lee Clemens Date: Tue, 19 Jan 2016 19:12:00 -0500 Subject: [PATCH] Reload logs after logrotate across distros Signed-off-by: Jean Flach fixes #10935 --- etc/logrotate.d/icinga2.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/etc/logrotate.d/icinga2.cmake b/etc/logrotate.d/icinga2.cmake index ba95e7bd7..d96fd7a09 100644 --- a/etc/logrotate.d/icinga2.cmake +++ b/etc/logrotate.d/icinga2.cmake @@ -7,11 +7,7 @@ notifempty create 644 @ICINGA2_USER@ @ICINGA2_GROUP@ postrotate - if service icinga2 status > /dev/null; then - if [ -e @ICINGA2_RUNDIR@/icinga2/icinga2.pid ]; then - kill -USR1 $(cat @ICINGA2_RUNDIR@/icinga2/icinga2.pid) - fi - fi + /bin/kill -USR1 $(cat @ICINGA2_RUNDIR@/icinga2/icinga2.pid 2> /dev/null) 2> /dev/null || true endscript } -- 2.40.0