Skip to content

Commit a2dab6c

Browse files
authored
To avoid chowning mail conf folder if it does not exists
1 parent 310a379 commit a2dab6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/v-change-domain-owner

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ if [ ! -z "$mail_data" ]; then
151151
exim_user="Debian-exim"
152152
fi
153153
# Chowning mail conf files to exim user
154-
find $HOMEDIR/$user/conf/mail/$domain -user root \
155-
-exec chown $exim_user {} \;
154+
if [ -d "$HOMEDIR/$user/conf/mail/$domain" ]; then
155+
find $HOMEDIR/$user/conf/mail/$domain -user root \
156+
-exec chown $exim_user {} \;
157+
fi
156158

157159
# Rebuild config
158160
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1

0 commit comments

Comments
 (0)