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
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
# Checking alias on the server
is_domain_new 'quiet' "$dom_alias"

View file

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

View file

@ -39,7 +39,7 @@ is_user_suspended
is_web_domain_valid
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
# Checking errorlog is not added
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")
template="${3-default}"
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}"
# Importing variables
@ -43,7 +43,7 @@ is_user_suspended
is_web_domain_valid
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
# Check nginx is not added
is_web_domain_key_empty '$NGINX'

View file

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

View file

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

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid
# 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
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
# Checking ip
is_ip_avalable

View file

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

View file

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

View file

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

View file

@ -40,7 +40,7 @@ is_user_suspended
is_web_domain_valid
# 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
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
# Checking alias is added
cur_alias=$(get_web_domain_value '$ALIAS')

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -37,7 +37,7 @@ is_user_suspended
is_web_domain_valid
# 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
# 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 '
# Defining replace string
str_repl=" Redirect / http://$url/"
str_repl=" Redirect / http://$url"
# Suspending vhost
change_web_config
@ -65,16 +65,27 @@ change_web_config
# Check ssl vhost
cert=$(get_web_domain_value '$SSL_CERT')
if [ ! -z "$cert" ]; then
# Defining teplate name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"
# Defining config
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
str_repl=" Redirect / http://$url/"
# 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
# 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
fi

View file

@ -53,6 +53,8 @@ domains=$(dom_clear_search)
# Starting suspend loop
for domain in $domains; do
domain_idn=$(idn -t --quiet -a "$domain")
# Get template name
tpl_name=$(get_web_domain_value '$TPL')
tpl_file="$V_WEBTPL/apache_$tpl_name.tpl"
@ -85,6 +87,24 @@ for domain in $domains; do
change_web_config
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
update_web_domain_value '$SUSPEND' 'yes'

View file

@ -36,7 +36,7 @@ is_user_valid
is_web_domain_valid
# Check domain is suspened
is_domain_unsuspended 'web_domains'
is_domain_unsuspended 'web'
#----------------------------------------------------------#
@ -82,6 +82,25 @@ if [ ! -z "$cert" ]; then
change_web_config
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 #

View file

@ -36,7 +36,7 @@ is_user_valid
is_web_domain_valid
# 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
# Checking domain is not suspened
is_domain_suspended 'web_domains'
is_domain_suspended 'web'
#----------------------------------------------------------#