[routino] 12/13: Remove Apache configuration in postrm too.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Feb 20 20:20:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository routino.

commit 2b185819b2d8b6465c3009c2f5697fac0be42fad
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Feb 20 20:39:42 2015 +0100

    Remove Apache configuration in postrm too.
---
 debian/changelog          |  2 ++
 debian/routino-www.postrm | 16 ++++++++++++++++
 debian/routino-www.prerm  |  2 +-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index a2b920f..b92d6e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ routino (2.7.3-1) UNRELEASED; urgency=medium
   * Add substitution variable ${perl:Depends} to routino-www.
   * Add man pages for routino utilities.
     (closes: #704172)
+  * Remove Apache configuration in postrm too.
+    (closes: #775245)
 
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 06 Feb 2015 21:22:51 +0100
 
diff --git a/debian/routino-www.postrm b/debian/routino-www.postrm
index ce84778..ad92f09 100644
--- a/debian/routino-www.postrm
+++ b/debian/routino-www.postrm
@@ -7,9 +7,25 @@ if [ "$DPKG_DEBUG" = "developer" ]; then
   set -x
 fi
 
+apache_uninstall() {
+        COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
+
+        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+                . /usr/share/apache2/apache2-maintscript-helper
+                apache2_invoke disconf routino-www || exit $?
+        elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
+                [ ! -L /etc/apache2/conf.d/routino-www.conf ] || rm /etc/apache2/conf.d/routino-www.conf
+        fi
+
+        rm -f /etc/apache2/conf-available/routino-www.conf
+}
+
 if [ "$1" = "purge" ]; then
+	apache_uninstall
+
 	rm -rf /var/lib/routino/results
 	rmdir --ignore-fail-on-non-empty /var/lib/routino/data || true
+	rmdir --ignore-fail-on-non-empty /var/lib/routino || true
 fi
 
 #DEBHELPER#
diff --git a/debian/routino-www.prerm b/debian/routino-www.prerm
index 9c7ec57..e9bd700 100644
--- a/debian/routino-www.prerm
+++ b/debian/routino-www.prerm
@@ -17,7 +17,7 @@ apache_uninstall() {
                 [ ! -L /etc/apache2/conf.d/routino-www.conf ] || rm /etc/apache2/conf.d/routino-www.conf
         fi
 
-        rm /etc/apache2/conf-available/routino-www.conf
+        rm -f /etc/apache2/conf-available/routino-www.conf
 }
 
 if [ "$1" = "deconfigure" ]; then

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/routino.git



More information about the Pkg-grass-devel mailing list