#!/bin/sh # postinst script for teribear apache_install() { mkdir -p /etc/apache2/conf-available ln -sf ../../teribear/apache.conf /etc/apache2/conf-available/teribear.conf 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 teribear elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/teribear.conf ] && ln -s ../conf-available/teribear.conf /etc/apache2/conf.d/teribear.conf fi apache2_invoke enmod rewrite } if [ "$1" = "configure" ]; then apache_install $@ fi exit 0