aboutsummaryrefslogtreecommitdiff
path: root/mail/squirrelmail/pkg-deinstall
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2004-01-13 15:59:50 +0000
committerClement Laforet <clement@FreeBSD.org>2004-01-13 15:59:50 +0000
commit78300b9f901470a2e8b20d861bbbe2ac524c70b6 (patch)
tree81c9a722af3ebc916a7224d237412f15e72b8ec8 /mail/squirrelmail/pkg-deinstall
parent135f393f31ffba79e13997e5a9f61fc5886b87d1 (diff)
downloadports-78300b9f901470a2e8b20d861bbbe2ac524c70b6.tar.gz
ports-78300b9f901470a2e8b20d861bbbe2ac524c70b6.zip
Notes
Diffstat (limited to 'mail/squirrelmail/pkg-deinstall')
-rw-r--r--mail/squirrelmail/pkg-deinstall43
1 files changed, 43 insertions, 0 deletions
diff --git a/mail/squirrelmail/pkg-deinstall b/mail/squirrelmail/pkg-deinstall
new file mode 100644
index 000000000000..b0738c370e2c
--- /dev/null
+++ b/mail/squirrelmail/pkg-deinstall
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+#set -vx
+
+PKG_BATCH=${BATCH:=NO}
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+SQUIRRELDIR=%%SQUIRRELDIR%%
+
+checkfile() {
+ diff -bBqw $1 $2 >/dev/null 2>&1
+ case $? in
+ 0) # config file exists, but is the same
+ rm $1
+ ;;
+ 1) # config file exists and differs
+ ;;
+ *) # no config file exists
+ ;;
+ esac
+}
+
+case $2 in
+ DEINSTALL)
+ cd ${PKG_PREFIX}
+ checkfile /var/spool/squirrelmail/prefs/default_pref \
+ ${SQUIRRELDIR}/data/default_pref
+ ;;
+ POST-DEINSTALL)
+ if [ "${PKG_BATCH}" = "NO" ]; then
+ echo "If you are no longer going to use SquirrelMail"
+ echo "you should remove the /var/spool/squirrelmail"
+ echo "directory with:"
+ echo
+ echo " rm -rf /var/spool/squirrelmail"
+ fi
+ ;;
+
+esac