Files
VestaCP/bin/v_list_sys_interfaces
Serghey Rodin 641ed97fdd export from svn
2011-06-14 00:22:25 +03:00

47 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# info: listing system interfaces
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
# Argument defenition
format="${1-shell}"
limit="${2-1000}"
offset="${3-1}"
# Importing variables
source $VESTA/conf/vars.conf
source $V_FUNC/shared_func.sh
source $V_FUNC/ip_func.sh
#----------------------------------------------------------#
# Verifications #
#----------------------------------------------------------#
# Checking argument format
format_validation 'limit' 'offset'
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
# Listing domains
case $format in
json) ipint_json_list ;;
shell) ipint_shell_list ;;
*) check_args '1' '0' '[format] [limit] [offset]'
esac
#----------------------------------------------------------#
# Vesta #
#----------------------------------------------------------#
# Logging
log_event 'system' "$V_EVENT"
exit $OK