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