replaced SSL key w/ SSL_CERT

This commit is contained in:
Serghey Rodin 2011-06-30 00:52:55 +03:00
commit c819cdaeb0
17 changed files with 33 additions and 35 deletions

View file

@ -89,8 +89,8 @@ str_repl=" ServerAlias ${new_alias_idn//,/ }"
httpd_change_config httpd_change_config
# Checking ssl domain # Checking ssl domain
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining ssl template # Defining ssl template
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -75,8 +75,8 @@ str_repl=' Options +Includes -Indexes +ExecCGI'
httpd_change_config httpd_change_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get ssl template name # Get ssl template name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -66,8 +66,8 @@ str_repl=" ErrorLog /var/log/httpd/domains/$domain.error.log"
httpd_change_config httpd_change_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get ssl template name # Get ssl template name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -52,7 +52,7 @@ ip=$(get_web_domain_value '$IP')
is_sys_ip_owner is_sys_ip_owner
# Check ssl is not added # Check ssl is not added
is_web_domain_key_empty '$SSL' is_web_domain_key_empty '$SSL_CERT'
# Checking ssl certificate # Checking ssl certificate
is_web_domain_cert_valid is_web_domain_cert_valid
@ -121,7 +121,6 @@ fi
increase_user_value "$user" '$U_WEB_SSL' increase_user_value "$user" '$U_WEB_SSL'
# Adding ssl values # Adding ssl values
update_web_domain_value '$SSL' 'yes'
update_web_domain_value '$SSL_HOME' "$tpl_option" update_web_domain_value '$SSL_HOME' "$tpl_option"
update_web_domain_value '$SSL_CERT' "$cert" update_web_domain_value '$SSL_CERT' "$cert"

View file

@ -61,8 +61,8 @@ old_ip=$(get_web_domain_value '$IP')
change_domain_ip "$conf" "$domain" "$ip" "$old_ip" "$tpl_file" change_domain_ip "$conf" "$domain" "$ip" "$old_ip" "$tpl_file"
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get tpl # Get tpl
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -7,7 +7,8 @@
# Argument defenition # Argument defenition
user="$1" user="$1"
domain="$2" domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
certificate="$3" certificate="$3"
# Importing variables # Importing variables
@ -42,7 +43,7 @@ is_web_domain_valid
is_domain_suspended 'web_domains' is_domain_suspended 'web_domains'
# Check SSL is added # Check SSL is added
is_web_domain_value_exist '$SSL' is_web_domain_value_exist '$SSL_CERT'
# Checking ssl certificate # Checking ssl certificate
is_web_domain_cert_valid is_web_domain_cert_valid

View file

@ -42,7 +42,7 @@ is_web_domain_valid
is_domain_suspended 'web_domains' is_domain_suspended 'web_domains'
# Check SSL is added # Check SSL is added
is_web_domain_value_exist '$SSL' is_web_domain_value_exist '$SSL_CERT'
#----------------------------------------------------------# #----------------------------------------------------------#

View file

@ -60,8 +60,8 @@ conf="$V_HOME/$user/conf/httpd.conf"
httpd_del_config httpd_del_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get tpl # Get tpl
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"
@ -104,11 +104,10 @@ if [ -x $V_WEBTPL/apache_$template.sh ]; then
fi fi
# Checking ssl # Checking ssl
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" = 'yes' ]; then
# Defining variables for ssl template replace # Defining variables for ssl template replace
web_ssl_port=$(get_config_value '$WEB_SSL_PORT') web_ssl_port=$(get_config_value '$WEB_SSL_PORT')
tpl_option=$(get_web_domain_value '$SSL_HOME') tpl_option=$(get_web_domain_value '$SSL_HOME')
cert=$(get_web_domain_value '$SSL_CERT')
ssl_cert="$V_HOME/$user/conf/$cert.crt" ssl_cert="$V_HOME/$user/conf/$cert.crt"
ssl_key="$V_HOME/$user/conf/$cert.key" ssl_key="$V_HOME/$user/conf/$cert.key"
case $tpl_option in case $tpl_option in

View file

@ -57,8 +57,8 @@ conf="$V_HOME/$user/conf/httpd.conf"
httpd_del_config httpd_del_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get tpl # Get tpl
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -86,8 +86,8 @@ str_repl=" ServerAlias ${new_alias_idn//,/ }"
httpd_change_config httpd_change_config
# Checking ssl domain # Checking ssl domain
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining ssl template # Defining ssl template
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -75,8 +75,8 @@ str_repl=' Options +Includes -Indexes -ExecCGI'
httpd_change_config httpd_change_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get ssl template name # Get ssl template name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -66,8 +66,8 @@ str_repl=" #ErrorLog /var/log/httpd/domains/$domain.error.log"
httpd_change_config httpd_change_config
# Checking ssl # Checking ssl
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Get ssl template name # Get ssl template name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -42,7 +42,7 @@ is_web_domain_valid
is_domain_suspended 'web_domains' is_domain_suspended 'web_domains'
# Checking ssl is added # Checking ssl is added
is_web_domain_value_exist '$SSL' is_web_domain_value_exist '$SSL_CERT'
#----------------------------------------------------------# #----------------------------------------------------------#
@ -67,7 +67,6 @@ cert=$(get_web_domain_value '$SSL_CERT' )
tpl_option=$(get_web_domain_value '$SSL_HOME' ) tpl_option=$(get_web_domain_value '$SSL_HOME' )
# Deleting ssl in config # Deleting ssl in config
update_web_domain_value '$SSL' 'no'
update_web_domain_value '$SSL_HOME' '' update_web_domain_value '$SSL_HOME' ''
update_web_domain_value '$SSL_CERT' '' update_web_domain_value '$SSL_CERT' ''

View file

@ -62,8 +62,8 @@ str_repl=" Redirect / http://$url/"
httpd_change_config httpd_change_config
# Check ssl vhost # Check ssl vhost
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining teplate name # Defining teplate name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -70,8 +70,8 @@ for domain in $domains; do
httpd_change_config httpd_change_config
# Check ssl vhost # Check ssl vhost
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining teplate name # Defining teplate name
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"

View file

@ -59,8 +59,8 @@ str_repl=" DocumentRoot $V_HOME/$user/domains/$domain/public_html"
httpd_change_config httpd_change_config
# Check ssl vhost # Check ssl vhost
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining teplate name and ssl documentroot option # Defining teplate name and ssl documentroot option
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"
tpl_option=$(get_web_domain_value '$SSL_HOME') tpl_option=$(get_web_domain_value '$SSL_HOME')

View file

@ -67,8 +67,8 @@ for domain in $domains; do
httpd_change_config httpd_change_config
# Check ssl vhost # Check ssl vhost
ssl=$(get_web_domain_value '$SSL') cert=$(get_web_domain_value '$SSL_CERT')
if [ "$ssl" = 'yes' ]; then if [ ! -z "$cert" ]; then
# Defining teplate name and ssl documentroot option # Defining teplate name and ssl documentroot option
tpl_file="$V_WEBTPL/apache_$tpl_name.stpl" tpl_file="$V_WEBTPL/apache_$tpl_name.stpl"
tpl_opt=$(get_web_domain_value '$SSL_HOME') tpl_opt=$(get_web_domain_value '$SSL_HOME')