v_backup_sys_users 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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_CONF/vesta.conf
  12. source $V_FUNC/shared.func
  13. #----------------------------------------------------------#
  14. # Action #
  15. #----------------------------------------------------------#
  16. user_list=$(ls $V_USERS/)
  17. # Updating user billing
  18. for user in $user_list; do
  19. $V_BIN/v_backup_sys_user $user >> $V_LOG/backup.log 2>> $V_LOG/backup.log
  20. done
  21. #----------------------------------------------------------#
  22. # Vesta #
  23. #----------------------------------------------------------#
  24. # Logging
  25. log_event 'system' "$V_EVENT"
  26. exit