replaced underscore with dash in api syscalls

This commit is contained in:
Serghey Rodin 2012-11-09 18:26:32 +02:00
commit b6b7eacadb
283 changed files with 438 additions and 412 deletions

54
bin/v-list-mail-accounts Executable file
View file

@ -0,0 +1,54 @@
#!/bin/bash
# info: list mail domain accounts
# options: user domain [format]
#
# The function of obtaining the list of all user domains.
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
user=$1
domain=$2
format=${3-shell}
# Includes
source $VESTA/func/main.sh
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
check_args '2' "$#" 'user domain [format]'
validate_format 'user' 'domain'
is_object_valid 'user' 'USER' "$user"
is_object_valid 'mail' 'DOMAIN' "$domain"
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Defining fileds to select
conf=$USER_DATA/mail/$domain.conf
fields="\$ACCOUNT \$ALIAS \$FWD \$AUTOREPLY \$QUOTA \$U_DISK \$SUSPENDED"
fields="$fields \$TIME \$DATE"
# Listing domain accounts
case $format in
json) json_list ;;
plain) nohead=1; shell_list ;;
shell) fields='$ACCOUNT $AUTOREPLY $QUOTA $U_DISK $SUSPENDED $TIME $DATE';
shell_list | column -t ;;
*) check_args '1' '0' 'user [format]'
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
exit