Only restart Apache on package configure if it is running
authorRuss Allbery <rra@debian.org>
Mon, 29 Nov 2010 22:29:49 +0000 (14:29 -0800)
committerRuss Allbery <rra@debian.org>
Mon, 29 Nov 2010 23:53:26 +0000 (15:53 -0800)
* Only restart Apache if it is running.  Thanks, Mehdi Dogguy, Michael
  Biebl, and Ferenc Wagner.

debian/changelog
debian/libapache2-mod-shib2.postinst

index 7916848..ecd671c 100644 (file)
@@ -1,3 +1,10 @@
+shibboleth-sp2 (2.3.1+dfsg-4) unstable; urgency=low
+
+  * Only restart Apache if it is running.  Thanks, Mehdi Dogguy, Michael
+    Biebl, and Ferenc Wagner.
+
+ -- Russ Allbery <rra@debian.org>  Mon, 29 Nov 2010 14:29:42 -0800
+
 shibboleth-sp2 (2.3.1+dfsg-3) unstable; urgency=low
 
   [ Ferenc Wagner ]
index fcc1b5c..0e4cb1f 100755 (executable)
@@ -34,7 +34,9 @@ if [ "$1" = "configure" ] ; then
     # The new shibd (which is about to be started) requires the corresponding
     # Apache module, otherwise strange, hard to debug error messages result.
     if [ -f /etc/apache2/mods-enabled/shib2.load ] ; then
-        invoke-rc.d apache2 restart
+        if invoke-rc.d apache2 status >/dev/null ; then
+            invoke-rc.d apache2 restart
+        fi
     fi
 fi