c149369e83
PR: 84349 Submitted by: Matthias Andree <matthias.andree@gmx.de>
28 lines
808 B
Bash
28 lines
808 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
|
|
LOCALSTATEDIR=${LOCALSTATEDIR:=/var/spool/courier}
|
|
|
|
USER=%%MAILOWN%%
|
|
GROUP=%%MAILGRP%%
|
|
|
|
if [ ":$2" = ":POST-DEINSTALL" ]; then
|
|
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
|
|
echo ""
|
|
echo "Warning: Removing user courier will also delete any"
|
|
echo " undelivered mail in the mail queue directories!!!"
|
|
echo " Do *not* do it if you're upgrading and would like"
|
|
echo " courier to continue trying to deliver this mail."
|
|
echo ""
|
|
else
|
|
AFFIRM='-y'
|
|
fi
|
|
[ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown -Rh ${USER}:${GROUP} "$LOCALSTATEDIR"
|
|
/usr/sbin/rmuser ${AFFIRM} ${USER} 2> /dev/null
|
|
[ -d "$LOCALSTATEDIR" ] && /usr/sbin/chown root:wheel "$LOCALSTATEDIR"
|
|
fi
|
|
|
|
exit 0
|