[Pkg-nagios-changes] [pkg-icinga2] 03/05: Add patch to fix broken postrotate script

Alexander Wirt formorer at debian.org
Fri Apr 24 05:58:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

formorer pushed a commit to branch debmon-jessie
in repository pkg-icinga2.

commit 392a0bfba3e95e9db2fdf6de95a4614e07ab286c
Author: Alexander Wirt <formorer at debian.org>
Date:   Wed Apr 22 09:41:26 2015 +0200

    Add patch to fix broken postrotate script
---
 debian/patches/fix_logrotate | 17 +++++++++++++++++
 debian/patches/series        |  1 +
 2 files changed, 18 insertions(+)

diff --git a/debian/patches/fix_logrotate b/debian/patches/fix_logrotate
new file mode 100644
index 0000000..8298e63
--- /dev/null
+++ b/debian/patches/fix_logrotate
@@ -0,0 +1,17 @@
+--- a/etc/logrotate.d/icinga2.cmake
++++ b/etc/logrotate.d/icinga2.cmake
+@@ -7,9 +7,11 @@
+ 	notifempty
+ 	create 644 @ICINGA2_USER@ @ICINGA2_GROUP@
+ 	postrotate
+-		if ! kill -l USR1 `cat @ICINGA2_RUNDIR@/icinga2/icinga2.pid`; then
+-			exit 1
+-		fi
++        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
+ 	endscript
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ffc3680..75ef661 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+fix_logrotate
 fix_upstream_version
 21_config_changes

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git



More information about the Pkg-nagios-changes mailing list