#!/bin/sh # postinst script for hcoop-apache2-config # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # make sure to keep in sync with prerm HCOOP_APACHE_MODULES="auth_kerb cache dav dav_fs dav_lock disk_cache expires include mime_magic negotiation proxy proxy_http rewrite ssl status suexec suphp waklog" case "$1" in configure) # Redundantly enable on upgrades in case some new modules were # enabled for mod in $HCOOP_APACHE_MODULES; do a2enmod -q $mod done # Enable vhosts. This has to be in sites-enabled so that # 000default is loaded before member vhosts a2ensite hcoop-vhosts HCOOP_ENABLE_FAILED=0 for mod in $HCOOP_APACHE_MODULES; do if [ ! -e "/etc/apache2/modules-enabled/${mod}.load" ]; then HCOOP_ENABLED_FAILED=1 fi done if [ ! $HCOOP_ENABLE_FAILED ]; then invoke-rc.d apache2 restart fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0