#!/bin/bash -e # Uses debconf . /usr/share/debconf/confmodule 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 < /dev/null 2>&1 || true echo -e "\033[31m**********************************************" echo "* ALTERNC-AWSTATS ACTION REQUESTED *" echo "* If you add an autorized user called 'admin'*" echo "* in statistics section, he will access *" echo "* every stats of every users *" echo "* *" echo "* Please run alternc.install to fully deploy *" echo "**********************************************" echo -e "\033[0m" ;; 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