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
·40 lines (29 loc) · 1.07 KB
/
Copy pathv_backup_users
File metadata and controls
executable file
·40 lines (29 loc) · 1.07 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
40
#!/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.d/vesta.sh
# Importing variables
source $VESTA/conf/vars.conf
source $V_CONF/vesta.conf
source $V_FUNC/shared.func
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
user_list=$(ls $V_USERS/)
# Updating user billing
for user in $user_list; do
$V_BIN/v_backup_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log
done
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event 'system' "$V_EVENT"
exit