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

sebastic-guest pushed a commit to branch master
in repository routino.

commit 693ede92b51aa748de316a23cfe89c9a8283f1ae
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Fri Dec 5 18:13:32 2014 +0100

    Add prerm for routino-www to remove the Apache configuration.
---
 debian/changelog            |  1 +
 debian/routino-www.postinst |  2 +-
 debian/routino-www.prerm    | 28 ++++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 82c5c9f..2f4d291 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ routino (2.7.2-2) UNRELEASED; urgency=medium
     - 2.7-1.2  Don't fail on removal of non-existing directory
   * Set Debian GIS Project as Maintainer, move Thibaut Gridel to Uploaders.
   * Add gbp.conf to use pristine-tar by default.
+  * Add prerm for routino-www to remove the Apache configuration.
 
  -- Bas Couwenberg <sebas...@xs4all.nl>  Fri, 05 Dec 2014 17:27:13 +0100
 
diff --git a/debian/routino-www.postinst b/debian/routino-www.postinst
index e5486a4..b10a9ee 100644
--- a/debian/routino-www.postinst
+++ b/debian/routino-www.postinst
@@ -27,7 +27,7 @@ apache_install() {
 
        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
                . /usr/share/apache2/apache2-maintscript-helper
-               apache2_invoke enconf routino-www
+               apache2_invoke enconf routino-www || exit $?
        elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = 
"unpacked" ] ; then
                [ -d /etc/apache2/conf.d/ ] && [ ! -L 
/etc/apache2/conf.d/routino-www.conf ] && ln -s 
../conf-available/routino-www.conf /etc/apache2/conf.d/routino-www.conf
        fi
diff --git a/debian/routino-www.prerm b/debian/routino-www.prerm
new file mode 100644
index 0000000..5287912
--- /dev/null
+++ b/debian/routino-www.prerm
@@ -0,0 +1,28 @@
+#! /bin/sh
+# postrm script for routino-www
+#
+set -e
+
+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 /etc/apache2/conf-available/routino-www.conf
+}
+
+if [ "$1" = "deconfigure" ]; then
+    apache_uninstall
+fi
+
+#DEBHELPER#
+

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

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to