summaryrefslogtreecommitdiff
path: root/mail/dovecot/pkg-deinstall
diff options
context:
space:
mode:
Diffstat (limited to 'mail/dovecot/pkg-deinstall')
-rw-r--r--mail/dovecot/pkg-deinstall16
1 files changed, 9 insertions, 7 deletions
diff --git a/mail/dovecot/pkg-deinstall b/mail/dovecot/pkg-deinstall
index 21c58498bdbe..b48d69d0a2e9 100644
--- a/mail/dovecot/pkg-deinstall
+++ b/mail/dovecot/pkg-deinstall
@@ -29,13 +29,15 @@ yesno() {
}
delete_account() {
- local u
+ local port user uid group gid
- u=$1
- if yesno "Do you want me to remove user \"${u}\"" n; then
- pw userdel -n ${u}
- echo "Done."
- fi
+ port=$1
+ user=${2%:*}
+ uid=${2#*:}
+ group=${3%:*}
+ gid=${3#*:}
+
+ echo "If you do not intend to reinstall ${port}, you should manually remove the user '${user}' (uid='${uid}') and the group '${group}' (gid='${gid}')."
}
case $2 in
@@ -50,7 +52,7 @@ DEINSTALL)
fi
fi
- delete_account dovecot
+ delete_account Dovecot dovecot:143 dovecot:143
base=/var/run/dovecot
DIRLIST="${base}/login ${base}"