| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/bin/bash
- # info: Getting dns domain value
- #----------------------------------------------------------#
- # 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/^/$/")
- # Importing variables
- source $VESTA/conf/vars.conf
- source $V_CONF/vesta.conf
- source $V_FUNC/shared.func
- source $V_FUNC/domain.func
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- # Checking args
- check_args '3' "$#" 'user domain key'
- # Checking argument format
- format_validation 'user' 'domain'
- # Checking user
- is_user_valid
- # Checking domain exist
- is_dns_domain_valid
- # Checking domain is not suspened
- is_domain_suspended 'dns'
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Checking key
- value=$(get_dns_domain_value "$key")
- # Printing value
- echo "$value"
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event 'system' "$V_EVENT"
- exit
|