#!/bin/sh -e # Uses debconf . /usr/share/debconf/confmodule MENUFILE="/etc/alternc/menulist.txt" LOGAPACHE="/etc/alternc/awstats.log.alternc.conf" APACHEROTATE="/etc/logrotate.d/apache2" logrotate_apache() { cp -a -f $APACHEROTATE $APACHEROTATE.tmp sed -e 's/create 640 root adm/create 640 root www-data/' < $APACHEROTATE > $APACHEROTATE.tmp mv -f $APACHEROTATE.tmp $APACHEROTATE } case "$1" in configure) # Then, configure the quota for "aws" db_get alternc-awstats/default_quota_value || true /usr/lib/alternc/quota_init aws $RET db_stop echo "Installing mysql table" mysql --defaults-file=/etc/alternc/my.cnf \ $LOGAPACHE < $LOGAPACHE <$MENUFILE.alternc_awstats mv -f $MENUFILE.alternc_awstats $MENUFILE fi echo "**********************************************" echo "* ALTERNC-AWSTATS *" echo "* Add an autorized user called 'admin' in *" echo "* statistics section, so he will access *" echo "* every stats of every users *" echo "* *" echo "* Please run alternc.install to fully deploy *" echo "**********************************************" ;; 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# # vim: et sw=4