summaryrefslogtreecommitdiff
path: root/libapache2-mod-dnssd.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'libapache2-mod-dnssd.postinst')
-rw-r--r--libapache2-mod-dnssd.postinst48
1 files changed, 48 insertions, 0 deletions
diff --git a/libapache2-mod-dnssd.postinst b/libapache2-mod-dnssd.postinst
new file mode 100644
index 0000000..5d6edbd
--- /dev/null
+++ b/libapache2-mod-dnssd.postinst
@@ -0,0 +1,48 @@
+#! /bin/sh
+
+# postinst script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ if dpkg --compare-versions "$2" lt "0.6-3.1" ; then
+ for CONF in /etc/apache2/mods-enabled/mod-dnssd.conf /etc/apache2/mods-enabled/mod-dnssd.load ; do
+ if [ -L $CONF ] ; then
+ target=$(readlink -e "$CONF") || true
+ sitename=$(basename "$CONF")
+ if [ -z "$target" ] ; then
+ rm -f $CONF
+ # a2enmod may not be installed. In that case don't bother to enable the link
+ # again, as the environment is special.
+ a2enmod -m -q "$sitename" || true
+ fi
+ fi
+ done
+ fi
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+