Explorar o código

Avoid user backup if user is not created from Vesta

dpeca %!s(int64=7) %!d(string=hai) anos
pai
achega
76319e5a1b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      bin/v-backup-users

+ 3 - 0
bin/v-backup-users

@@ -28,6 +28,9 @@ if [ -z "$BACKUP_SYSTEM" ]; then
     exit
     exit
 fi
 fi
 for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
 for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
+    if [ ! -f "$VESTA/data/users/$user/user.conf" ]; then
+        continue;
+    fi
     check_suspend=$(grep "SUSPENDED='no'" $VESTA/data/users/$user/user.conf)
     check_suspend=$(grep "SUSPENDED='no'" $VESTA/data/users/$user/user.conf)
     log=$VESTA/log/backup.log
     log=$VESTA/log/backup.log
     if [ ! -z "$check_suspend" ]; then
     if [ ! -z "$check_suspend" ]; then