#!/bin/bash # info: listing user nameservers #----------------------------------------------------------# # Variable&Function # #----------------------------------------------------------# # Argument defenition user="$1" format="${2-shell}" # Importing variables source $VESTA/conf/vars.conf source $V_FUNC/shared_func.sh #----------------------------------------------------------# # Verifications # #----------------------------------------------------------# # Checking args check_args '1' "$#" 'user [format]' # Checking argument format format_validation 'user' # Checking user is_user_valid #----------------------------------------------------------# # Action # #----------------------------------------------------------# # Listing nameservers case $format in json) usrns_json_list ;; shell) usrns_shell_list ;; *) check_args '1' '0' 'user [format]' esac #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# # Logging log_event 'system' "$V_EVENT" exit $OK