postinst is in courier-webadmin 0.76.3-5+deb9u1.
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 | #! /bin/sh -e
# Source debconf library
. /usr/share/debconf/confmodule
add_override() {
if ! dpkg-statoverride --list $4 >/dev/null; then
dpkg-statoverride --update --add $1 $2 $3 $4
fi
}
if [ "$1" = "configure" ]; then
add_override root courier 0750 /etc/courier/webadmin
add_override root courier 0750 /etc/courier/webadmin/added
add_override root courier 0750 /etc/courier/webadmin/removed
add_override root courier 4755 /usr/lib/courier/courier/webmail/webadmin
# install CGI script for Courier web administration
db_get courier-webadmin/install-cgi
if [ "$RET" = "true" ]; then
cp -p /usr/lib/courier/courier/webmail/webadmin /usr/lib/cgi-bin/courierwebadmin
chmod 4555 /usr/lib/cgi-bin/courierwebadmin
fi
# record password for Courier web administration
db_get courier-webadmin/password
if [ "$RET" ]; then
touch /etc/courier/webadmin/password
chmod 0640 /etc/courier/webadmin/password
chown root:courier /etc/courier/webadmin/password
echo $RET > /etc/courier/webadmin/password
fi
fi
exit 0
|