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
|
#!/bin/sh
# Exit immediately if a command produces an error.
set -e
# Source debconf library
. /usr/share/debconf/confmodule
# Create a dpkg-statoverride add function.
add_override() {
if ! dpkg-statoverride --list $4 >/dev/null 2>&1; then
dpkg-statoverride --update --add $1 $2 $3 $4
fi
}
if [ "$1" = "configure" ]; then
# Add the dpkg-statoverrides.
add_override courier courier 750 /etc/courier/webadmin
add_override courier courier 750 /etc/courier/webadmin/added
# The password is sensitive, so it should only be readable by courier.
add_override courier courier 600 /etc/courier/webadmin/password
add_override courier courier 750 /etc/courier/webadmin/removed
# Store the password for Courier web administration
db_get courier-webadmin/password
if [ "$RET" ]; then
echo $RET > /etc/courier/webadmin/password
fi
fi
#DEBHELPER#
exit 0
|