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
|
#!/bin/sh
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x
set_dspam_perms() {
#touch /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages
#chown dspam.dspam /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages
#chmod 660 /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages
## If you add any other permission/ownership tweaks here, then
## remember to add a corresponding remove operation to the
## remove_dspam_perms() function, below
# Database password info is contained in dspam.conf
if ! dpkg-statoverride --list /etc/dspam/dspam.conf >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.conf
fi
if ! dpkg-statoverride --list /usr/bin/dspam >/dev/null
then
dpkg-statoverride --update --add dspam dspam 2755 /usr/bin/dspam
fi
if ! dpkg-statoverride --list /var/spool/dspam >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0770 /var/spool/dspam
fi
if ! dpkg-statoverride --list /var/spool/dspam/data >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0770 /var/spool/dspam/data
fi
if ! dpkg-statoverride --list /etc/dspam/default.prefs >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0644 /etc/dspam/default.prefs
fi
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
;;
reconfigure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
|