(fix) first pass (and hopefully only) at Apache 2.2->2.4 mess

pull/85/head
Ludovic Marcotte 2015-05-13 15:48:47 -04:00
parent fb121974ec
commit 4de814c3b2
4 changed files with 23 additions and 2 deletions

View File

@ -80,7 +80,7 @@ install-arch: build-arch
install -D -m 644 Scripts/sogo-default debian/tmp/etc/default/sogo
install -D -m 644 debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf
install -D -m 644 Apache/SOGo.conf debian/tmp/etc/apache2/conf-available/SOGo.conf
install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo
install -D -m 644 Scripts/logrotate debian/tmp/etc/logrotate.d/sogo
install -d -m 750 debian/tmp/etc/sogo

View File

@ -1,4 +1,4 @@
etc/apache2/conf.d/SOGo.conf
etc/apache2/conf-available/SOGo.conf
etc/cron.d/sogo
etc/default/sogo
etc/logrotate.d/sogo

View File

@ -26,6 +26,18 @@ case "$1" in
chown root:sogo /etc/sogo
chmod 640 /etc/sogo/sogo.conf
chown root:sogo /etc/sogo/sogo.conf
# Apache 2.2 / 2.4 kungfu
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 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
ln -s ../conf-available/SOGo.conf /etc/apache2/conf.d/SOGo.conf
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)

View File

@ -13,5 +13,14 @@ set -e
# for details, see /usr/share/doc/packaging-manual/
#DEBHELPER#
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
[ ! -L /etc/apache2/conf.d/SOGo.conf ] || rm /etc/apache2/conf.d/SOGo.conf
fi
fi
exit 0