postinst is in loganalyzer 3.6.6+dfsg-2ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #!/bin/sh
# currently comment out because otherwise it freezes
#. /usr/share/debconf/confmodule
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
if [ "$1" = "configure" ];
then
# To use the web-based config, the admin needs to
# make this file writeable by www-data - but we don't
# do that here for the moment.
#chown www-data /etc/loganalyzer/config.php
#chmod 0660 /etc/loganalyzer/config.php
webserver="apache2"
pkgname=loganalyzer
if [ -x /usr/sbin/$webserver ];
then
# Auto-configure module dependencies
a2enmod php7.0 || true
a2enmod cgi || true
# this is not mandatory, so we don't do it now
# maybe support this with debconf one day
#a2enmod mongo || true
HTTPD_ETC=/etc/$webserver
HTTPD_CONF_OLD=$HTTPD_ETC/conf.d
HTTPD_CONF_NEW=$HTTPD_ETC/conf-available
if [ -d $HTTPD_ETC ];
then
if [ -d ${HTTPD_CONF_OLD} -a ! -f ${HTTPD_CONF_OLD}/${pkgname} -a ! -h ${HTTPD_CONF_OLD}/${pkgname} ];
then
ln -s /etc/${pkgname}/apache.conf ${HTTPD_CONF_OLD}/${pkgname}
fi
if [ -d ${HTTPD_CONF_NEW} -a ! -f ${HTTPD_CONF_NEW}/${pkgname}.conf -a ! -h ${HTTPD_CONF_NEW}/${pkgname}.conf ];
then
ln -s /etc/${pkgname}/apache.conf ${HTTPD_CONF_NEW}/${pkgname}.conf
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enconf loganalyzer.conf || exit $?
fi
fi
fi
fi
fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
exit 0
|