postinst is in dspam 3.10.2+dfsg-13.
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | #!/bin/sh
set -e
set_dspam_perms() {
# If you add any other permission/ownership tweaks here, then
# remember to add a corresponding remove operation to the
# dspam.postrm
# Database password info is contained in dspam.conf and other conffiles
for config_file in dspam.conf dspam.d/extlookup.conf ; do
if ! dpkg-statoverride --list /etc/dspam/$config_file >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/$config_file
fi
done
# dspam & dspamc need to be setgid
for agent in dspam dspamc ; do
if ! dpkg-statoverride --list /usr/bin/$agent >/dev/null
then
dpkg-statoverride --update --add dspam dspam 2755 /usr/bin/$agent
fi
done
# so as tools (standard users can then use them provided DSPAM doesn't use
# virtual users)
for tool in dspam_2sql dspam_admin dspam_clean dspam_crc dspam_dump \
dspam_merge dspam_stats dspam_train ; do
if ! dpkg-statoverride --list /usr/bin/$tool >/dev/null
then
dpkg-statoverride --update --add root dspam 2755 /usr/bin/$tool
fi
done
# Directories in /var/spool/dspam are made read-only as they contain private data
DSPAM_HOME="/var/spool/dspam"
for dir in $DSPAM_HOME $DSPAM_HOME/data $DSPAM_HOME/opt-in $DSPAM_HOME/opt-out ; do
if ! dpkg-statoverride --list $dir >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0770 $dir
fi
done
if ! dpkg-statoverride --list /var/log/dspam >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0755 /var/log/dspam
fi
return 0
}
case "$1" in
configure)
set_dspam_perms
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/dspam" ] || [ -e "/etc/init/dspam.conf" ]; then
if [ ! -e "/etc/init/dspam.conf" ]; then
update-rc.d dspam start 21 2 3 4 5 . stop 21 0 1 6 . >/dev/null
fi
invoke-rc.d dspam start || exit $?
fi
# End automatically added section
exit 0
|