summaryrefslogtreecommitdiff
path: root/mail/mailwrapper/DEINSTALL
blob: c20aea8f2009cb315f5dcc78cd5bf6bb6c5de89b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# $NetBSD: DEINSTALL,v 1.3 2004/08/10 21:46:34 jlam Exp $

MAILWRAPPEES="@MAILWRAPPEES@"
MAILWRAPPER="${PKG_PREFIX}/sbin/mailwrapper"
MAILER_CONF="${PKG_SYSCONFDIR}/mailer.conf"
MAILER_CONF_SAMPLE="${PKG_PREFIX}/share/examples/mailwrapper/mailer.conf.sendmail"
MW_BACKUP_SFX="@MAILWRAPPER_BACKUP_SFX@"

ALL_FILES="${ALL_FILES} ${MAILER_CONF_SAMPLE} ${MAILER_CONF}"

case ${STAGE} in
DEINSTALL)
	for file in ${MAILWRAPPEES}; do
		if [ -f ${file}${MW_BACKUP_SFX} ]; then
			${ECHO} "Restoring ${file}${MW_BACKUP_SFX} to ${file}."
			${RM} -f ${file}
			${MV} -f ${file}${MW_BACKUP_SFX} ${file}
		fi
	done
	;;
esac