#!/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 $@ touch "/etc/postfixadmin/config.local.php" fi # See: (deadlink) 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 # fix permissions, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856338 chown www-data /var/cache/postfixadmin/templates_c chmod 700 /var/cache/postfixadmin/templates_c # since 3.3.14+ds1-1, smarty has been external shared php libs. # upgrading from bookworm to trixie breaks because the symlink is not created correctly # Bug: #1091492 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091492) if [ -d /usr/share/postfixadmin/lib/smarty/libs ]; then rm -rf /usr/share/postfixadmin/lib/smarty/libs fi # Automatically added by dh_apache2/UNDECLARED 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 1 done fi fi # End automatically added section exit 0