mirror of
https://github.com/serghey-rodin/vesta.git
synced 2026-03-11 06:30:35 +01:00
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/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
|