blob: a2eeb5401bb10f964b5e1dd22f89ff212f23274f (
plain)
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
|
# $NetBSD: DEINSTALL,v 1.8 2019/08/20 02:38:04 schmonz Exp $
QMAILDIR=@QMAILDIR@
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
case "${STAGE}" in
DEINSTALL)
cd ${PKG_SYSCONFDIR}
for i in mailer-daemon postmaster root ${QMAIL_QUEUE_EXTRA}; do
f="alias/.qmail-${i}"
if [ -e ${f} ]; then
contents=$(${CAT} ${f})
if [ "${contents}" = '# pkgsrc says: replace this comment with your config' ] \
|| [ "${contents}" = '' ]; then
${RM} -f ${f}
fi
fi
done
for i in defaultdomain locals me plusdomain rcpthosts; do
${CMP} -s control/${i} .pkgsrc-defaults-do-not-edit/${i} \
&& ${RM} -f control/${i}
${RM} -f .pkgsrc-defaults-do-not-edit/${i}
done
cd ${QMAILDIR}
for dir in ${VAR_QMAIL_DIRS}; do
[ -h ${dir} ] \
&& ${RM} -f ${dir}
done
;;
esac
|