You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

postfixadmin.postinst 1.2KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. set -e
  3. if [ "$1" = "configure" ]; then
  4. # configure DB stuff via dbconfig-common
  5. dbc_generate_include=php:/etc/postfixadmin/dbconfig.inc.php
  6. dbc_generate_include_args="-O root:www-data -m 640 -U"
  7. . /usr/share/debconf/confmodule
  8. . /usr/share/dbconfig-common/dpkg/postinst
  9. dbc_go postfixadmin $@
  10. fi
  11. # remove legacy apache and lighthttpd configuration symlink,
  12. # conf.d is no longer supported with Apache 2.4
  13. if [ "$(readlink /etc/apache2/conf.d/postfixadmin)" = "../../postfixadmin/apache.conf" ]; then
  14. rm -f /etc/apache2/conf.d/postfixadmin
  15. fi
  16. if [ "$(readlink /etc/lighttpd/conf-available/postfixadmin)" = "../../postfixadmin/lighttpd.conf" ]; then
  17. rm -f /etc/lighttpd/conf-available/postfixadmin
  18. fi
  19. # See : https://sourceforge.net/p/postfixadmin/bugs/376/ - remove any existing templates_c files on upgrade.
  20. if [ -d /usr/share/postfixadmin/templates_c ]; then
  21. find /usr/share/postfixadmin/templates_c -type f -exec rm -r {} \;
  22. fi
  23. if [ -d /usr/share/postfixadmin/templates_c ]; then
  24. chown www-data /usr/share/postfixadmin/templates_c
  25. fi
  26. if [ -d /var/cache/postfixadmin ]; then
  27. find /var/cache/postfixadmin -type f -exec rm -r {} \;
  28. chown www-data /var/cache/postfixadmin
  29. fi
  30. #DEBHELPER#
  31. exit 0