File: postfixadmin.postinst

package info (click to toggle)
postfixadmin 3.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,032 kB
  • ctags: 6,386
  • sloc: php: 24,257; perl: 1,018; sh: 619; python: 169; makefile: 84
file content (28 lines) | stat: -rw-r--r-- 983 bytes parent folder | download | duplicates (2)
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
#!/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
#DEBHELPER#

exit 0