mirror of
https://github.com/serghey-rodin/vesta.git
synced 2026-02-02 04:29:32 +01:00
40 lines
1.1 KiB
Bash
Executable File
40 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
|
|
|
|
# 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 #
|
|
#----------------------------------------------------------#
|
|
|
|
# Logging
|
|
log_event "$OK" "$EVENT"
|
|
|
|
exit
|