PostfixAdmin - web based virtual user administration interface for Postfix mail servers https://postfixadmin.github.io/postfixadmin/
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.

38 lines
915 B

  1. #!/bin/sh
  2. set -e
  3. if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
  4. if [ -f /usr/share/debconf/confmodule ]; then
  5. . /usr/share/debconf/confmodule
  6. db_version 2.0
  7. # restart the webserver only if we know which one was configured.
  8. if db_get postfixadmin/reconfigure-webserver; then
  9. servers="$RET"
  10. restart=$servers
  11. linkname="postfixadmin"
  12. if [ -e /usr/share/wwwconfig-common/restart.sh ]; then
  13. . /usr/share/wwwconfig-common/restart.sh
  14. fi
  15. fi
  16. if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
  17. . /usr/share/dbconfig-common/dpkg/postrm
  18. dbc_go postfixadmin $@
  19. fi
  20. fi
  21. if [ "$1" = "purge" ]; then
  22. rm -f /etc/postfixadmin/dbconfig.inc.php
  23. if which ucf >/dev/null 2>&1; then
  24. ucf --purge /etc/postfixadmin/dbconfig.inc.php
  25. fi
  26. db_purge || true
  27. fi
  28. fi
  29. #DEBHELPER#
  30. exit 0