v-unsuspend-database-server 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash
  2. # info: unsuspend database server
  3. # options: type host
  4. #
  5. # The function for unsuspending a database server.
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  8. #----------------------------------------------------------#
  9. # Argument defenition
  10. type=$1
  11. host=$2
  12. # Includes
  13. source $VESTA/conf/vesta.conf
  14. source $VESTA/func/main.sh
  15. #----------------------------------------------------------#
  16. # Verifications #
  17. #----------------------------------------------------------#
  18. check_args '2' "$#" 'type host'
  19. validate_format 'type' 'host'
  20. is_system_enabled "$DB_SYSTEM"
  21. is_object_valid "../../conf/$type" 'HOST' "$host"
  22. is_object_suspended "../../conf/$type" 'HOST' "$host"
  23. #----------------------------------------------------------#
  24. # Action #
  25. #----------------------------------------------------------#
  26. # Unsuspend database creation on a server
  27. update_object_value "../../conf/$type" 'HOST' "$host" '$SUSPENDED' 'no'
  28. #----------------------------------------------------------#
  29. # Vesta #
  30. #----------------------------------------------------------#
  31. # Logging
  32. log_event "$OK" "$EVENT"
  33. exit