Wrong order of steps in v-change-domain-owner, fixed

This commit is contained in:
dpeca 2017-01-25 14:47:32 +01:00 committed by GitHub
commit 2f73044746

View file

@ -144,6 +144,11 @@ if [ ! -z "$mail_data" ]; then
find $HOMEDIR/$user/mail/$domain -user $owner \
-exec chown -h $user {} \;
# Rebuild config
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
$BIN/v-rebuild-mail-domains $owner no
$BIN/v-rebuild-mail-domains $user
# Checking exim username for later chowning
exim_user="exim";
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
@ -155,11 +160,6 @@ if [ ! -z "$mail_data" ]; then
find $HOMEDIR/$user/conf/mail/$domain -user root \
-exec chown $exim_user {} \;
fi
# Rebuild config
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
$BIN/v-rebuild-mail-domains $owner no
$BIN/v-rebuild-mail-domains $user
fi
# Update counters