From 9ed702f821648064204cf9a1c91d6e6ccb22860a Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 31 Jan 2012 09:47:01 +0100 Subject: [PATCH] pnp4nagios-web.postinst: Don't call a2mod / restart apache2 unconditionally. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … rather, only if the binaries are available. Thanks to Wouter Schoot for reporting this. Closes: #636218 --- debian/changelog | 5 ++++- debian/pnp4nagios-web.postinst | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9d82bf9..eae8c57 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,11 @@ pnp4nagios (0.6.16-1) unstable; urgency=low - Added recommended targets build-{arch,indep} depending on build-stamp. * debian/pnp4nagios-bin.install: - Install verify_pnp_config_v2.pl to /u/l/pnp4nagios/libexec/. + * debian/pnp4nagios-web.postinst: + - Call a2mod / restart apache2 only if the binaries are available; thanks + to Wouter Schoot for reporting this (Closes: #636218). - -- Sebastian Harl Tue, 31 Jan 2012 09:38:49 +0100 + -- Sebastian Harl Tue, 31 Jan 2012 09:45:56 +0100 pnp4nagios (0.6.13-1) unstable; urgency=low diff --git a/debian/pnp4nagios-web.postinst b/debian/pnp4nagios-web.postinst index f5f2597..feb27e7 100644 --- a/debian/pnp4nagios-web.postinst +++ b/debian/pnp4nagios-web.postinst @@ -44,13 +44,17 @@ configure_apache2() { if [ -d /etc/apache2/mods-enabled ]; then if [ ! -e /etc/apache2/mods-enabled/rewrite.load ]; then - a2enmod rewrite - a2reload="true" + if [ -x /usr/sbin/a2enmod ]; then + a2enmod rewrite + a2reload="true" + fi fi fi if [ "$a2reload" = "true" ]; then - invoke-rc.d apache2 reload + if [ -x /etc/init.d/apache2 ]; then + invoke-rc.d apache2 reload + fi fi } -- 2.30.2