forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv-backup-users
More file actions
executable file
·39 lines (29 loc) · 1.09 KB
/
v-backup-users
File metadata and controls
executable file
·39 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# info: backup all users
# options: none
#
# The function backups all system users.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Importing system enviroment as we run this script
# mostly by cron wich not read it by itself
source /etc/profile
# Includes
source $VESTA/conf/vesta.conf
source $VESTA/func/main.sh
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
for user in $(ls $VESTA/data/users); do
check_suspend=$(grep "SUSPENDED='no'" $VESTA/data/users/$user/user.conf)
if [ ! -z "$check_suspend" ]; then
$BIN/v-backup-user $user >> $VESTA/log/backup.log 2>&1
fi
done
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# No Logging
#log_event "$OK" "$EVENT"
exit