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