v-suspend-remote-dns-host 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # info: suspend remote dns server
  3. # options: HOST
  4. #
  5. # The function for suspending remote dns server.
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  8. #----------------------------------------------------------#
  9. # Argument definition
  10. host=$1
  11. # Includes
  12. source $VESTA/func/main.sh
  13. source $VESTA/conf/vesta.conf
  14. #----------------------------------------------------------#
  15. # Verifications #
  16. #----------------------------------------------------------#
  17. check_args '1' "$#" 'HOST'
  18. is_format_valid 'host'
  19. is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
  20. is_object_valid "../../conf/dns-cluster" 'HOST' "$host"
  21. is_object_unsuspended "../../conf/dns-cluster" 'HOST' "$host"
  22. #----------------------------------------------------------#
  23. # Action #
  24. #----------------------------------------------------------#
  25. # Unsuspend remote dns server
  26. update_object_value "../../conf/dns-cluster" 'HOST' "$host" '$SUSPENDED' 'yes'
  27. #----------------------------------------------------------#
  28. # Vesta #
  29. #----------------------------------------------------------#
  30. # Logging
  31. log_event "$OK" "$ARGUMENTS"
  32. exit