#!/bin/sh # postinst script for libapache2-mod-rivet # # 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 APACHE2CONF="/etc/apache2/" case "$1" in configure) if [ -z "$2" ] ; then # enabling the module. This code was largely taken from # http://wiki.debian.org/Apache/PackagingFor24. if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper # mod_rivet requires the prefork MPM if [ $(a2query -M) != 'prefork' ] ; then apache2_msg notice "attempting to enable Apache2 prefork mpm" if apache2_switch_mpm prefork ; then apache2_invoke enmod rivet else apache2_msg err "Could not switch to prefork, not enabling mod_rivet" fi else apache2_invoke enmod rivet fi fi 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