From 143ee59f5b5401c28374f882ad73d7763c3894d7 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 15 May 2015 09:38:58 -0400 Subject: [PATCH] Improved debian packaging regarding apache 2.2 -> 2.4 --- packaging/debian-multiarch/sogo.postinst | 2 +- packaging/debian-multiarch/sogo.prerm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packaging/debian-multiarch/sogo.postinst b/packaging/debian-multiarch/sogo.postinst index cb988a921..0cbb5b80e 100644 --- a/packaging/debian-multiarch/sogo.postinst +++ b/packaging/debian-multiarch/sogo.postinst @@ -34,7 +34,7 @@ case "$1" in . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf SOGo || exit $? elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - if [ -d /etc/apache2/conf.d/ -a ! -L /etc/apache2/conf.d/SOGo.conf ]; then + if [ -d /etc/apache2/conf.d/ -a ! -e /etc/apache2/conf.d/SOGo.conf ]; then ln -s ../conf-available/SOGo.conf /etc/apache2/conf.d/SOGo.conf fi fi diff --git a/packaging/debian-multiarch/sogo.prerm b/packaging/debian-multiarch/sogo.prerm index 7d304833a..35f46aa4a 100644 --- a/packaging/debian-multiarch/sogo.prerm +++ b/packaging/debian-multiarch/sogo.prerm @@ -18,7 +18,10 @@ if [ "$1" = "deconfigure" ] ; then # Apache 2.2 / 2.4 kungfu COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - if [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf SOGo || exit $? + elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then [ ! -L /etc/apache2/conf.d/SOGo.conf ] || rm /etc/apache2/conf.d/SOGo.conf fi