postinst is in postfixadmin 3.0.2-2.
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 | #!/bin/bash
set -e
if [ "$1" = "configure" ]; then
# configure DB stuff via dbconfig-common
dbc_generate_include=php:/etc/postfixadmin/dbconfig.inc.php
dbc_generate_include_args="-O root:www-data -m 640 -U"
. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/postinst
dbc_go postfixadmin $@
fi
# remove legacy apache and lighthttpd configuration symlink,
# conf.d is no longer supported with Apache 2.4
if [ "$(readlink /etc/apache2/conf.d/postfixadmin)" = "../../postfixadmin/apache.conf" ]; then
rm -f /etc/apache2/conf.d/postfixadmin
fi
if [ "$(readlink /etc/lighttpd/conf-available/postfixadmin)" = "../../postfixadmin/lighttpd.conf" ]; then
rm -f /etc/lighttpd/conf-available/postfixadmin
fi
# See : https://sourceforge.net/p/postfixadmin/bugs/376/ - remove any existing templates_c files on upgrade.
if [ -d /usr/share/postfixadmin/templates_c ]; then
find /usr/share/postfixadmin/templates_c -type f -exec rm -r {} \;
fi
# Automatically added by dh_apache2
if true; then
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
. /usr/share/apache2/apache2-maintscript-helper
for conf in postfixadmin ; do
apache2_invoke enconf $conf || exit $?
done
fi
fi
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper mv_conffile /etc/postfixadmin/apache.conf /etc/apache2/conf-available/postfixadmin.conf 2.3.7-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper mv_conffile /etc/postfixadmin/lighttpd.conf /etc/lighttpd/conf-available/postfixadmin.conf 2.3.7-1~ -- "$@"
# End automatically added section
exit 0
|