summaryrefslogtreecommitdiff
path: root/extra/dovecot/dovecot.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-10 23:14:36 +0000
committerroot <root@rshg054.dnsready.net>2011-08-10 23:14:36 +0000
commite81c6fe4fb38144709923b2da3ab68a01712a26b (patch)
treee98431d7c18b82156a91c9cb208d725c06e84793 /extra/dovecot/dovecot.install
parenta306c2530354c1c02351c4cc02eefa53c8d23eac (diff)
Wed Aug 10 23:14:35 UTC 2011
Diffstat (limited to 'extra/dovecot/dovecot.install')
-rw-r--r--extra/dovecot/dovecot.install18
1 files changed, 11 insertions, 7 deletions
diff --git a/extra/dovecot/dovecot.install b/extra/dovecot/dovecot.install
index 51d1509ee..ddec178a4 100644
--- a/extra/dovecot/dovecot.install
+++ b/extra/dovecot/dovecot.install
@@ -11,9 +11,9 @@ post_install() {
fi
if grep -q "^dovecot:" /etc/passwd 2> /dev/null ; then
- usermod -s /sbin/nologin -c "Dovecot user" -d /var/run/dovecot/login -u 76 -g dovecot dovecot &> /dev/null
+ usermod -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot dovecot &> /dev/null
else
- useradd -s /sbin/nologin -c "Dovecot user" -d /var/run/dovecot/login -u 76 -g dovecot -m -r dovecot &> /dev/null
+ useradd -s /sbin/nologin -c "Dovecot user" -d /var/empty -u 76 -g dovecot -r dovecot &> /dev/null
fi
# dovenull
@@ -24,9 +24,9 @@ post_install() {
fi
if grep -q "^dovenull:" /etc/passwd 2> /dev/null ; then
- usermod -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/run/dovecot/login -u 74 -g dovenull dovenull &> /dev/null
+ usermod -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull dovenull &> /dev/null
else
- useradd -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/run/dovecot/login -u 74 -g dovenull -m -r dovenull &> /dev/null
+ useradd -s /sbin/nologin -c "Dovecot user for completely untrustworthy processes" -d /var/empty -u 74 -g dovenull -r dovenull &> /dev/null
fi
# harden some permissions
@@ -36,15 +36,19 @@ post_install() {
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
- post_install $1
if [ "`vercmp $2 2.0.0`" -lt 0 ]; then
# important upgrade notice
echo "> IMPORTANT DOVECOT 2.0 UPGRADE NOTICE"
echo "> ------------------------------------"
echo "> see http://wiki2.dovecot.org/Upgrading/2.0"
echo "> make sure, you convert the dovecot.conf file"
- fi
-
+ fi
+ if [ "`vercmp $2 2.0.13-2`" -lt 0 ]; then
+ # to remove no more existant usersdirs simply remove the dovecot users and let them recreate later
+ userdel dovecot &> /dev/null
+ userdel dovenull &> /dev/null
+ fi
+ post_install $1
}
# arg 1: the old package version