[Pkg-nagios-changes] [SCM] debian packaging of PNP4Nagios branch, master, updated. v_0_6_13-1-18-g3bbdef1

Sebastian Harl sh at tokkee.org
Tue Jan 31 14:21:02 UTC 2012


The following commit has been merged in the master branch:
commit 9ed702f821648064204cf9a1c91d6e6ccb22860a
Author: Sebastian Harl <sh at tokkee.org>
Date:   Tue Jan 31 09:47:01 2012 +0100

    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 <tokkee at debian.org>  Tue, 31 Jan 2012 09:38:49 +0100
+ -- Sebastian Harl <tokkee at debian.org>  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
 }
 

-- 
debian packaging of PNP4Nagios



More information about the Pkg-nagios-changes mailing list