aboutsummaryrefslogtreecommitdiff
path: root/mail/dovecot/files/pkg-deinstall.in
diff options
context:
space:
mode:
Diffstat (limited to 'mail/dovecot/files/pkg-deinstall.in')
-rw-r--r--mail/dovecot/files/pkg-deinstall.in16
1 files changed, 5 insertions, 11 deletions
diff --git a/mail/dovecot/files/pkg-deinstall.in b/mail/dovecot/files/pkg-deinstall.in
index 30ae84752a39..d4192f7efbed 100644
--- a/mail/dovecot/files/pkg-deinstall.in
+++ b/mail/dovecot/files/pkg-deinstall.in
@@ -1,8 +1,9 @@
#! /bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.1 2008-09-08 06:42:28 beech Exp $
+# $FreeBSD: /tmp/pcvs/ports/mail/dovecot/files/pkg-deinstall.in,v 1.2 2008-11-28 14:38:26 wxs Exp $
#
-# ex:ts=4
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
ask() {
local question default answer
@@ -48,7 +49,7 @@ case $2 in
DEINSTALL)
if ps -axc | grep -qw dovecot; then
if yesno "Dovecot is still running. Shall I stop it?" y; then
- killall dovecot
+ ${PKG_PREFIX}/etc/rc.d/dovecot stop
sleep 2
else
echo "OK ... I hope you know what you are doing."
@@ -57,14 +58,7 @@ DEINSTALL)
delete_account Dovecot dovecot:${DOVECOT_UID:-%%DOVECOT_UID%%} dovecot:${DOVECOT_GID:-%%DOVECOT_GID%%}
- echo "Also manually rm -rf /var/db/dovecot if anything was stored there."
-
- base=/var/run/dovecot
- DIRLIST="${base}/login ${base}"
- echo "Cleaning up \"${base}\"."
- for directory in ${DIRLIST}; do
- rmdir ${directory} 2>/dev/null || :
- done
+ echo "Also manually 'rm -rf /var/db/dovecot' if anything was stored there."
;;
esac