mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
backup for all users
This commit is contained in:
parent
d5361b6f70
commit
bd7ee8238c
1 changed files with 36 additions and 0 deletions
36
bin/v_backup_sys_users
Executable file
36
bin/v_backup_sys_users
Executable file
|
@ -0,0 +1,36 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# info: updating montly billing user report
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# 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_FUNC/shared_func.sh
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Action #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
user_list=$(ls $V_USERS/)
|
||||||
|
|
||||||
|
# Updating user billing
|
||||||
|
for user in $user_list; do
|
||||||
|
$V_BIN/v_backup_sys_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log
|
||||||
|
done
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Vesta #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
log_event 'system' "$V_EVENT"
|
||||||
|
|
||||||
|
exit $OK
|
Loading…
Add table
Add a link
Reference in a new issue