From: Sebastian Harl Date: Tue, 31 Jan 2012 08:47:01 +0000 (+0100) Subject: pnp4nagios-web.postinst: Don't call a2mod / restart apache2 unconditionally. X-Git-Tag: v_0_6_16-1~9 X-Git-Url: https://git.tokkee.org/?p=pkg-pnp4nagios.git;a=commitdiff_plain;h=9ed702f821648064204cf9a1c91d6e6ccb22860a pnp4nagios-web.postinst: Don't call a2mod / restart apache2 unconditionally. … rather, only if the binaries are available. Thanks to Wouter Schoot for reporting this. Closes: #636218 --- 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 }