renamed config file

This commit is contained in:
Serghey Rodin 2011-08-24 16:16:42 +03:00
commit 9ee68e6034
25 changed files with 82 additions and 32 deletions

View file

@ -41,7 +41,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking alias on the server # Checking alias on the server
is_domain_new 'quiet' "$dom_alias" is_domain_new 'quiet' "$dom_alias"

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking cgi is not added # Checking cgi is not added
is_web_domain_key_empty '$CGI' is_web_domain_key_empty '$CGI'

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking errorlog is not added # Checking errorlog is not added
is_web_domain_key_empty '$ELOG' is_web_domain_key_empty '$ELOG'

View file

@ -11,7 +11,7 @@ domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain") domain_idn=$(idn -t --quiet -a "$domain")
template="${3-default}" template="${3-default}"
default_extentions="jpg,jpeg,gif,png,ico,css,zip,tgz,gz,rar,bz2,doc,xls,exe,\ default_extentions="jpg,jpeg,gif,png,ico,css,zip,tgz,gz,rar,bz2,doc,xls,exe,\
pdf,ppt,txt,tar,wav,bmp,rtf,js,mp3,avi,mpeg" pdf,ppt,txt,tar,wav,bmp,rtf,js,mp3,avi,mpeg,html,htm"
extentions="${4-$default_extentions}" extentions="${4-$default_extentions}"
# Importing variables # Importing variables
@ -43,7 +43,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Check nginx is not added # Check nginx is not added
is_web_domain_key_empty '$NGINX' is_web_domain_key_empty '$NGINX'

View file

@ -42,7 +42,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking package # Checking package
is_package_full 'web_ssl' is_package_full 'web_ssl'

View file

@ -41,7 +41,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking statistic type # Checking statistic type
is_type_valid 'stat' "$type" is_type_valid 'stat' "$type"

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -41,7 +41,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking ip # Checking ip
is_ip_avalable is_ip_avalable

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Check SSL is added # Check SSL is added
is_web_domain_value_exist '$SSL_CERT' is_web_domain_value_exist '$SSL_CERT'

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Check SSL is added # Check SSL is added
is_web_domain_value_exist '$SSL_CERT' is_web_domain_value_exist '$SSL_CERT'

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking template # Checking template
templates=$(get_user_value '$WEB_TPL') templates=$(get_user_value '$WEB_TPL')

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -41,7 +41,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking alias is added # Checking alias is added
cur_alias=$(get_web_domain_value '$ALIAS') cur_alias=$(get_web_domain_value '$ALIAS')

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking cgi is added # Checking cgi is added
is_web_domain_value_exist '$CGI' is_web_domain_value_exist '$CGI'

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Check errorlog is added # Check errorlog is added
is_web_domain_value_exist '$ELOG' is_web_domain_value_exist '$ELOG'

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking ssl is added # Checking ssl is added
is_web_domain_value_exist '$NGINX' is_web_domain_value_exist '$NGINX'

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking ssl is added # Checking ssl is added
is_web_domain_value_exist '$SSL_CERT' is_web_domain_value_exist '$SSL_CERT'

View file

@ -38,7 +38,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking stats enabled # Checking stats enabled
is_web_domain_value_exist '$STATS' is_web_domain_value_exist '$STATS'

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
# Checking stats auth enabled # Checking stats auth enabled
is_web_domain_value_exist '$STATS_AUTH' is_web_domain_value_exist '$STATS_AUTH'

View file

@ -37,7 +37,7 @@ is_user_suspended
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -39,7 +39,7 @@ is_user_valid
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#
@ -57,7 +57,7 @@ conf="$V_HOME/$user/conf/httpd.conf"
search_phrase='DocumentRoot ' search_phrase='DocumentRoot '
# Defining replace string # Defining replace string
str_repl=" Redirect / http://$url/" str_repl=" Redirect / http://$url"
# Suspending vhost # Suspending vhost
change_web_config change_web_config
@ -65,16 +65,27 @@ change_web_config
# Check ssl vhost # Check ssl vhost
cert=$(get_web_domain_value '$SSL_CERT') cert=$(get_web_domain_value '$SSL_CERT')
if [ ! -z "$cert" ]; then if [ ! -z "$cert" ]; then
# Defining teplate name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"
# Defining config
conf="$V_HOME/$user/conf/shttpd.conf" conf="$V_HOME/$user/conf/shttpd.conf"
str_repl=" Redirect / http://$url"
change_web_config
fi
# Reefining replace string - old str_repl contains escaped chars # Check nginx vhost
str_repl=" Redirect / http://$url/" nginx=$(get_web_domain_value '$NGINX')
if [ ! -z "$nginx" ]; then
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.tpl"
conf="$V_HOME/$user/conf/nginx.conf"
search_phrase='proxy_pass'
str_repl=" rewrite ^(.*)\$ http://$url;"
change_web_config
fi
# Suspending vhost if [ ! -z "$nginx" ] && [ ! -z "$cert" ]; then
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.stpl"
conf="$V_HOME/$user/conf/snginx.conf"
search_phrase='proxy_pass'
str_repl=" rewrite ^(.*)\$ http://$url;"
change_web_config change_web_config
fi fi

View file

@ -53,6 +53,8 @@ domains=$(dom_clear_search)
# Starting suspend loop # Starting suspend loop
for domain in $domains; do for domain in $domains; do
domain_idn=$(idn -t --quiet -a "$domain")
# Get template name # Get template name
tpl_name=$(get_web_domain_value '$TPL') tpl_name=$(get_web_domain_value '$TPL')
tpl_file="$V_WEBTPL/apache_$tpl_name.tpl" tpl_file="$V_WEBTPL/apache_$tpl_name.tpl"
@ -85,6 +87,24 @@ for domain in $domains; do
change_web_config change_web_config
fi fi
# Check nginx vhost
nginx=$(get_web_domain_value '$NGINX')
if [ ! -z "$nginx" ]; then
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.tpl"
conf="$V_HOME/$user/conf/nginx.conf"
search_phrase='proxy_pass'
str_repl=" rewrite ^(.*)\$ http://$url;"
change_web_config
fi
if [ ! -z "$nginx" ] && [ ! -z "$cert" ]; then
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.stpl"
conf="$V_HOME/$user/conf/snginx.conf"
search_phrase='proxy_pass'
str_repl=" rewrite ^(.*)\$ http://$url;"
change_web_config
fi
# Adding suspend in config # Adding suspend in config
update_web_domain_value '$SUSPEND' 'yes' update_web_domain_value '$SUSPEND' 'yes'

View file

@ -36,7 +36,7 @@ is_user_valid
is_web_domain_valid is_web_domain_valid
# Check domain is suspened # Check domain is suspened
is_domain_unsuspended 'web_domains' is_domain_unsuspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#
@ -82,6 +82,25 @@ if [ ! -z "$cert" ]; then
change_web_config change_web_config
fi fi
# Check nginx vhost
nginx=$(get_web_domain_value '$NGINX')
if [ ! -z "$nginx" ]; then
ip=$(get_web_domain_value '$IP')
web_port=$(get_config_value '$WEB_PORT')
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.tpl"
conf="$V_HOME/$user/conf/nginx.conf"
search_phrase='rewrite ^(.*)$'
str_repl=" proxy_pass http://$ip:$web_port;"
change_web_config
fi
if [ ! -z "$nginx" ] && [ ! -z "$cert" ]; then
web_ssl_port=$(get_config_value '$WEB_SSL_PORT')
tpl_file="$V_WEBTPL/ngingx_vhost_$nginx.stpl"
conf="$V_HOME/$user/conf/snginx.conf"
str_repl=" proxy_pass https://$ip:$web_ssl_port;"
change_web_config
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -36,7 +36,7 @@ is_user_valid
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -36,7 +36,7 @@ is_user_valid
is_web_domain_valid is_web_domain_valid
# Checking domain is not suspened # Checking domain is not suspened
is_domain_suspended 'web_domains' is_domain_suspended 'web'
#----------------------------------------------------------# #----------------------------------------------------------#