| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #!/bin/bash
- # info: update domains statistics
- # options: USER
- #
- # The function runs log analyzer usage for all user webdomains.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument definition
- user=$1
- # Includes
- source $VESTA/func/main.sh
- source $VESTA/func/domain.sh
- source $VESTA/conf/vesta.conf
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- check_args '1' "$#" 'USER'
- is_format_valid 'user'
- is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
- is_object_valid 'user' 'USER' "$user"
- is_object_unsuspended 'user' 'USER' "$user"
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Starting upd loop
- for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do
- get_domain_values 'web'
- if [ ! -z "$STATS" ] && [ "$STATS" != 'no' ]; then
- $BIN/v-update-web-domain-stat "$user" "$domain"
- fi
- done
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event "$OK" "$ARGUMENTS"
- exit
|