mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -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
58
bin/v-list-user-stats
Executable file
58
bin/v-list-user-stats
Executable file
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
# info: list user stats
|
||||
# options: user [format]
|
||||
#
|
||||
# The function for listing user statistics
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
format=${2-shell}
|
||||
|
||||
# Includes
|
||||
source $VESTA/func/main.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'user [format]'
|
||||
validate_format 'user'
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Defining config
|
||||
conf=$USER_DATA/stats.log
|
||||
|
||||
# Defining fileds to select
|
||||
fields="\$DATE \$TIME \$PACKAGE \$IP_OWNED \$DISK_QUOTA \$U_DISK \$U_DISK_DIRS"
|
||||
fields="$fields \$U_DISK_WEB \$U_DISK_MAIL \$U_DISK_DB \$BANDWIDTH"
|
||||
fields="$fields \$U_BANDWIDTH \$U_WEB_DOMAINS \$U_WEB_SSL \$U_WEB_ALIASES"
|
||||
fields="$fields \$U_DNS_DOMAINS \$U_DNS_RECORDS \$U_MAIL_DOMAINS \$U_MAIL_DKIM"
|
||||
fields="$fields \$U_MAIL_ACCOUNTS \$U_DATABASES \$U_CRON_JOBS \$U_BACKUPS"
|
||||
|
||||
# Listing domains
|
||||
case $format in
|
||||
json) json_list ;;
|
||||
plain) nohead=1; shell_list ;;
|
||||
shell) fields='$DATE $PACKAGE $U_DISK $U_BANDWIDTH $U_WEB_DOMAINS';
|
||||
fields="$fields \$U_DATABASES"
|
||||
shell_list | column -t ;;
|
||||
*) check_args '1' '0' 'user [format]'
|
||||
esac
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue