mirror of
https://github.com/myvesta/vesta
synced 2025-07-16 10:03:23 -07:00
replaced underscore with dash in api syscalls
This commit is contained in:
parent
7ed705cee7
commit
b6b7eacadb
283 changed files with 438 additions and 412 deletions
49
bin/v-get-web-domain-value
Executable file
49
bin/v-get-web-domain-value
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/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
|
Loading…
Add table
Add a link
Reference in a new issue