Skip to content

Commit 76319e5

Browse files
authored
Avoid user backup if user is not created from Vesta
1 parent 5ab9fc5 commit 76319e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/v-backup-users

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if [ -z "$BACKUP_SYSTEM" ]; then
2828
exit
2929
fi
3030
for user in $(grep '@' /etc/passwd |cut -f1 -d:); do
31+
if [ ! -f "$VESTA/data/users/$user/user.conf" ]; then
32+
continue;
33+
fi
3134
check_suspend=$(grep "SUSPENDED='no'" $VESTA/data/users/$user/user.conf)
3235
log=$VESTA/log/backup.log
3336
if [ ! -z "$check_suspend" ]; then

0 commit comments

Comments
 (0)