source: trunk/Install/deb/debian/postinst

Last change on this file was 857, checked in by chronos, 6 years ago
  • Modified: Improved deb packaging script.
  • Property svn:executable set to *
File size: 784 bytes
Line 
1#!/bin/sh
2# postinst script for isp-central
3
4apache_install() {
5 mkdir -p /etc/apache2/conf-available
6 ln -sf ../../isp-central/apache.conf /etc/apache2/conf-available/isp-central.conf
7
8 COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
9
10 if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
11 . /usr/share/apache2/apache2-maintscript-helper
12 apache2_invoke enconf isp-central
13 elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
14 [ -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
15 fi
16 apache2_invoke enmod rewrite
17}
18
19if [ "$1" = "configure" ]; then
20 apache_install $@
21fi
22
23exit 0
Note: See TracBrowser for help on using the repository browser.