[Pkg-nagios-changes] [pkg-nagios3] 01/01: Check if apache init script exists before invoking it.
Alexander Wirt
formorer at debian.org
Sat May 24 07:23:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
formorer pushed a commit to branch master
in repository pkg-nagios3.
commit 111b7c771b4c1b0c9dde7b9e64b619de5848a639
Author: Alexander Wirt <formorer at debian.org>
Date: Sat May 24 09:23:05 2014 +0200
Check if apache init script exists before invoking it.
---
debian/nagios3-cgi.postinst | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/debian/nagios3-cgi.postinst b/debian/nagios3-cgi.postinst
index 81d6e4f..856bb33 100644
--- a/debian/nagios3-cgi.postinst
+++ b/debian/nagios3-cgi.postinst
@@ -65,9 +65,13 @@ case "$1" in
# create symlink if not existing
[ -f /etc/apache2/conf.d/nagios3.conf ] || ln -vs $apacheconf /etc/apache2/conf.d/nagios3.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/pkg-nagios3.git
More information about the Pkg-nagios-changes
mailing list