[Pkg-nagios-changes] [icinga] 32/36: Don't hardcode invoke-rc.d path in icinga-cgi.postinst.

Bas Couwenberg sebastic at debian.org
Sun Dec 18 16:10:37 UTC 2016


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

sebastic pushed a commit to branch modern-packaging
in repository icinga.

commit e913d48b95405f376b4530e32a1942ea58fa2a8d
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Dec 18 16:35:41 2016 +0100

    Don't hardcode invoke-rc.d path in icinga-cgi.postinst.
---
 debian/changelog           | 1 +
 debian/icinga-cgi.postinst | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 79e49c6..4ef1d99 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,7 @@ icinga (1.13.3-4) UNRELEASED; urgency=medium
     Thanks to Adriano Rafael Gomes.
     (closes: #799421)
   * Drop unused substitution variables.
+  * Don't hardcode invoke-rc.d path in icinga-cgi.postinst.
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 03 Dec 2016 23:27:06 +0100
 
diff --git a/debian/icinga-cgi.postinst b/debian/icinga-cgi.postinst
index ad4c384..c083aca 100644
--- a/debian/icinga-cgi.postinst
+++ b/debian/icinga-cgi.postinst
@@ -64,7 +64,7 @@ case "$1" in
         [ -f /etc/apache2/conf.d/icinga.conf ] || ln -vs $apacheconf /etc/apache2/conf.d/icinga.conf
 
         if [ -f /etc/init.d/apache2 ] ; then
-            if [ -x /usr/sbin/invoke-rc.d ]; then
+            if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
                 invoke-rc.d apache2 reload 3>/dev/null || true
             else
                 /etc/init.d/apache2 reload 3>/dev/null || true

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



More information about the Pkg-nagios-changes mailing list