v_backup_sys_users 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # info: updating montly billing user report
  3. #----------------------------------------------------------#
  4. # Variable&Function #
  5. #----------------------------------------------------------#
  6. # Importing system enviroment as we run this script
  7. # mostly by cron wich not read it by itself
  8. source /etc/profile.d/vesta.sh
  9. # Importing variables
  10. source $VESTA/conf/vars.conf
  11. source $V_FUNC/shared_func.sh
  12. #----------------------------------------------------------#
  13. # Action #
  14. #----------------------------------------------------------#
  15. user_list=$(ls $V_USERS/)
  16. # Updating user billing
  17. for user in $user_list; do
  18. $V_BIN/v_backup_sys_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log
  19. done
  20. #----------------------------------------------------------#
  21. # Vesta #
  22. #----------------------------------------------------------#
  23. # Logging
  24. log_event 'system' "$V_EVENT"
  25. exit $OK