| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #!/bin/bash
- # info: Getting web domain value
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument defenition
- user="$1"
- domain="$2"
- key=$(echo "$3"| tr '[:lower:]' '[:upper:]'|sed -e "s/^/$/")
- # Importing variables
- source $VESTA/conf/vars.conf
- source $V_FUNC/shared_func.sh
- source $V_FUNC/domain_func.sh
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- # Checking args
- check_args '3' "$#" 'user domain key'
- # Checking argument format
- format_validation 'user' 'domain'
- # Checking user
- is_user_valid
- # Checking user is active
- is_user_suspended
- # Checking domain exist
- is_web_domain_valid
- # Checking domain is not suspened
- is_domain_suspended 'web_domains'
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Checking key
- value=$(get_web_domain_value "$key")
- # Printing value
- echo "$value"
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event 'system' "$V_EVENT"
- exit $OK
|