Просмотр исходного кода

To avoid chowning mail conf folder if it does not exists

dpeca 9 лет назад
Родитель
Сommit
a2dab6c94a
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      bin/v-change-domain-owner

+ 4 - 2
bin/v-change-domain-owner

@@ -151,8 +151,10 @@ if [ ! -z "$mail_data" ]; then
         exim_user="Debian-exim"
         exim_user="Debian-exim"
     fi
     fi
     # Chowning mail conf files to exim user
     # Chowning mail conf files to exim user
-    find $HOMEDIR/$user/conf/mail/$domain -user root \
-        -exec chown $exim_user {} \;
+    if [ -d "$HOMEDIR/$user/conf/mail/$domain" ]; then
+        find $HOMEDIR/$user/conf/mail/$domain -user root \
+            -exec chown $exim_user {} \;
+    fi
 
 
     # Rebuild config
     # Rebuild config
     $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
     $BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1