v_unsuspend_web_domains 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # info: unsuspend web domains
  3. # options: user
  4. #
  5. # The function of unsuspending all user's sites.
  6. #----------------------------------------------------------#
  7. # Variable&Function #
  8. #----------------------------------------------------------#
  9. # Argument defenition
  10. user=$1
  11. # Importing variables
  12. source $VESTA/conf/vars.conf
  13. source $V_CONF/vesta.conf
  14. source $V_FUNC/shared.func
  15. source $V_FUNC/domain.func
  16. #----------------------------------------------------------#
  17. # Verifications #
  18. #----------------------------------------------------------#
  19. # Checking arg number
  20. check_args '1' "$#" 'user'
  21. # Checking argument format
  22. format_validation 'user'
  23. # Checking web system is enabled
  24. is_system_enabled 'web'
  25. # Checking user
  26. is_user_valid
  27. #----------------------------------------------------------#
  28. # Action #
  29. #----------------------------------------------------------#
  30. # Defining fileds to select
  31. conf="$V_USERS/$user/web.conf"
  32. field='$DOMAIN'
  33. search_string="SUSPEND='yes'"
  34. domains=$(dom_clear_search)
  35. # Starting unsuspend loop
  36. for domain in $domains; do
  37. $V_BIN/v_unsuspend_web_domain "$user" "$domain"
  38. done
  39. #----------------------------------------------------------#
  40. # Vesta #
  41. #----------------------------------------------------------#
  42. # Logging
  43. log_event 'system' "$V_EVENT"
  44. exit