| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #!/bin/bash
- # info: unsuspend web domains
- # options: user
- #
- # The function of unsuspending all user's sites.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument defenition
- user=$1
- # Importing variables
- source $VESTA/conf/vars.conf
- source $V_CONF/vesta.conf
- source $V_FUNC/shared.func
- source $V_FUNC/domain.func
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- # Checking arg number
- check_args '1' "$#" 'user'
- # Checking argument format
- format_validation 'user'
- # Checking web system is enabled
- is_system_enabled 'web'
- # Checking user
- is_user_valid
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Defining fileds to select
- conf="$V_USERS/$user/web.conf"
- field='$DOMAIN'
- search_string="SUSPEND='yes'"
- domains=$(dom_clear_search)
- # Starting unsuspend loop
- for domain in $domains; do
- $V_BIN/v_unsuspend_web_domain "$user" "$domain"
- done
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event 'system' "$V_EVENT"
- exit
|