[Pkg-nagios-changes] [icinga] 01/01: Check if apache init script exists before invoking it.

Alexander Wirt formorer at debian.org
Sat May 24 07:23:47 UTC 2014


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

formorer pushed a commit to branch master
in repository icinga.

commit 9d1836b79079edf5073a76d3b72b57c3532d96fd
Author: Alexander Wirt <formorer at debian.org>
Date:   Sat May 24 09:21:37 2014 +0200

    Check if apache init script exists before invoking it.
    
    Thanks: Georg Schönberg for bringing this up
---
 debian/icinga-cgi.postinst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/icinga-cgi.postinst b/debian/icinga-cgi.postinst
index 95b91fb..ad4c384 100644
--- a/debian/icinga-cgi.postinst
+++ b/debian/icinga-cgi.postinst
@@ -63,8 +63,13 @@ case "$1" in
         # create symlink if not existing
         [ -f /etc/apache2/conf.d/icinga.conf ] || ln -vs $apacheconf /etc/apache2/conf.d/icinga.conf
 
-        # reload webserver
-        [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload
+        if [ -f /etc/init.d/apache2 ] ; then
+            if [ -x /usr/sbin/invoke-rc.d ]; then
+                invoke-rc.d apache2 reload 3>/dev/null || true
+            else
+                /etc/init.d/apache2 reload 3>/dev/null || true
+            fi
+        fi
     fi  
 
 	# we reset the password every run, so if it exists we're running

-- 
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