Skip to content

Commit bd7ee82

Browse files
committed
backup for all users
1 parent d5361b6 commit bd7ee82

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

bin/v_backup_sys_users

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
# info: updating montly billing user report
3+
4+
#----------------------------------------------------------#
5+
# Variable&Function #
6+
#----------------------------------------------------------#
7+
8+
9+
# Importing system enviroment as we run this script
10+
# mostly by cron wich not read it by itself
11+
source /etc/profile.d/vesta.sh
12+
13+
# Importing variables
14+
source $VESTA/conf/vars.conf
15+
source $V_FUNC/shared_func.sh
16+
17+
18+
#----------------------------------------------------------#
19+
# Action #
20+
#----------------------------------------------------------#
21+
22+
user_list=$(ls $V_USERS/)
23+
24+
# Updating user billing
25+
for user in $user_list; do
26+
$V_BIN/v_backup_sys_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log
27+
done
28+
29+
#----------------------------------------------------------#
30+
# Vesta #
31+
#----------------------------------------------------------#
32+
33+
# Logging
34+
log_event 'system' "$V_EVENT"
35+
36+
exit $OK

0 commit comments

Comments
 (0)