| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #!/bin/bash
- # info: suspend database server
- # options: TYPE HOST
- #
- # The function for suspending a database server.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument defenition
- type=$1
- host=$2
- # Includes
- source $VESTA/conf/vesta.conf
- source $VESTA/func/main.sh
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- check_args '2' "$#" 'TYPE HOST'
- validate_format 'type' 'host'
- is_system_enabled "$DB_SYSTEM"
- is_object_valid "../../conf/$type" 'HOST' "$host"
- is_object_unsuspended "../../conf/$type" 'HOST' "$host"
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Suspend database creation on a server
- update_object_value "../../conf/$type" 'HOST' "$host" '$SUSPENDED' 'yes'
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event "$OK" "$EVENT"
- exit
|