v_backup_users 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # info: backup all users
  3. # options: none
  4. #
  5. # The function backups all system users.
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  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. # Importing variables
  13. source $VESTA/conf/vesta.conf
  14. source $VESTA/func/shared.sh
  15. #----------------------------------------------------------#
  16. # Action #
  17. #----------------------------------------------------------#
  18. user_list=$(ls $V_USERS/)
  19. # Updating user billing
  20. for user in $user_list; do
  21. $BIN/v_backup_user $user &>> $VESTA/logs/backup.log
  22. done
  23. #----------------------------------------------------------#
  24. # Vesta #
  25. #----------------------------------------------------------#
  26. # Logging
  27. log_event "$OK" "$EVENT"
  28. exit