| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #!/bin/bash
- # info: get web domain value
- # options: user domain key
- #
- # The function is intended for obtaining a domain value by the key. This call
- # is useful for arranging composite queries. The answer is displayed only in
- # raw form; output formats aren't supported.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument defenition
- user=$1
- domain=$(idn -t --quiet -u "$2" )
- domain_idn=$(idn -t --quiet -a "$domain")
- key=$(echo "$3"| tr '[:lower:]' '[:upper:]'|sed -e "s/^/$/")
- # Includes
- source $VESTA/conf/vesta.conf
- source $VESTA/func/main.sh
- source $VESTA/func/domain.sh
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- check_args '3' "$#" 'user domain key'
- validate_format 'user' 'domain'
- is_object_valid 'user' 'USER' "$user"
- is_object_unsuspended 'user' 'USER' "$user"
- is_object_valid 'web' 'DOMAIN' "$domain"
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- get_domain_values 'web'
- eval echo $key
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- exit
|