v-list-web-domains-ssl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. # info: list web domains and alias key
  3. # options: user [format]
  4. #
  5. # The function for obtaining the list of domains with SSL parameter displayed.
  6. # This call was arranged for filling in the lack of information by applying
  7. # v-list-web-domains call in the shell format.
  8. #----------------------------------------------------------#
  9. # Variable&Function #
  10. #----------------------------------------------------------#
  11. # Argument defenition
  12. user=$1
  13. format=${2-shell}
  14. # Includes
  15. source $VESTA/func/main.sh
  16. #----------------------------------------------------------#
  17. # Verifications #
  18. #----------------------------------------------------------#
  19. check_args '1' "$#" 'user [format]'
  20. validate_format 'user'
  21. is_object_valid 'user' 'USER' "$user"
  22. #----------------------------------------------------------#
  23. # Action #
  24. #----------------------------------------------------------#
  25. # Defining config
  26. conf="$USER_DATA/web.conf"
  27. # Defining fileds to select
  28. fields="\$DOMAIN \$IP \$TPL \$SSL \$SSL_HOME \$SUSPENDED"
  29. # Listing domains
  30. case $format in
  31. json) json_list ;;
  32. plain) nohead=1; shell_list ;;
  33. shell) shell_list | column -t ;;
  34. *) check_args '1' "0" 'user [format]'
  35. esac
  36. #----------------------------------------------------------#
  37. # Vesta #
  38. #----------------------------------------------------------#
  39. exit