diff --git a/bin/v_add_web_domain b/bin/v_add_web_domain index 2fe1eea4c..5b00bf695 100755 --- a/bin/v_add_web_domain +++ b/bin/v_add_web_domain @@ -205,7 +205,7 @@ v_str="$v_str TPL='$template'" v_str="$v_str ALIAS='$aliases'" v_str="$v_str $template_data" # Inserting PHP, CGI and ELOG keys v_str="$v_str STATS='' STATS_AUTH=''" -v_str="$v_str SSL_HOME='' SSL_CERT=''" +v_str="$v_str SSL='' SSL_HOME=''" v_str="$v_str NGINX='' NGINX_EXT='' SUSPEND='no' DATE='$V_DATE'" # Registering domain diff --git a/bin/v_add_web_domain_alias b/bin/v_add_web_domain_alias index 44ec56910..67b5357de 100755 --- a/bin/v_add_web_domain_alias +++ b/bin/v_add_web_domain_alias @@ -82,7 +82,7 @@ upd_web_domain_values del_web_config add_web_config -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -96,7 +96,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_add_web_domain_cgi b/bin/v_add_web_domain_cgi index c4d6746f2..6cc4df201 100755 --- a/bin/v_add_web_domain_cgi +++ b/bin/v_add_web_domain_cgi @@ -64,7 +64,7 @@ del_web_config add_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config diff --git a/bin/v_add_web_domain_elog b/bin/v_add_web_domain_elog index 5d9661cd3..dd193a3b0 100755 --- a/bin/v_add_web_domain_elog +++ b/bin/v_add_web_domain_elog @@ -64,7 +64,7 @@ del_web_config add_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -78,7 +78,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_add_web_domain_nginx b/bin/v_add_web_domain_nginx index c9845415a..41b9cc6db 100755 --- a/bin/v_add_web_domain_nginx +++ b/bin/v_add_web_domain_nginx @@ -68,7 +68,7 @@ conf="$V_HOME/$user/conf/nginx.conf" upd_web_domain_values add_web_config -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_add_web_domain_ssl b/bin/v_add_web_domain_ssl index 7ccf5e0f2..9c8ada957 100755 --- a/bin/v_add_web_domain_ssl +++ b/bin/v_add_web_domain_ssl @@ -49,7 +49,7 @@ is_domain_suspended 'web' is_package_full 'web_ssl' # Check ssl is not added -is_web_domain_key_empty '$SSL_CERT' +is_web_domain_key_empty '$SSL' # Checking ssl certificate is_web_domain_cert_valid @@ -63,7 +63,7 @@ is_web_domain_cert_valid get_web_domain_values conf="$V_HOME/$user/conf/shttpd.conf" tpl_file="$V_WEBTPL/apache_$TPL.stpl" -SSL_CERT=$ssl +SSL=$ssl SSL_HOME=$ssl_home # Checking ip ownership @@ -76,8 +76,8 @@ upd_web_domain_values add_web_config # Adding certificate to user dir -cp -f $V_USERS/$user/cert/$SSL_CERT.crt $ssl_cert -cp -f $V_USERS/$user/cert/$SSL_CERT.key $ssl_key +cp -f $V_USERS/$user/cert/$SSL.crt $ssl_cert +cp -f $V_USERS/$user/cert/$SSL.key $ssl_key # Running template trigger if [ -x $V_WEBTPL/apache_$template.sh ]; then @@ -115,7 +115,7 @@ fi increase_user_value "$user" '$U_WEB_SSL' # Adding ssl values -update_web_domain_value '$SSL_CERT' "$SSL_CERT" +update_web_domain_value '$SSL' "$SSL" update_web_domain_value '$SSL_HOME' "$SSL_HOME" # Logging diff --git a/bin/v_change_web_domain_ip b/bin/v_change_web_domain_ip index 65f5fc6a4..8e748152a 100755 --- a/bin/v_change_web_domain_ip +++ b/bin/v_change_web_domain_ip @@ -61,7 +61,7 @@ new=$ip replace_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" replace_web_config @@ -75,7 +75,7 @@ if [ ! -z "$NGINX" ]; then fi # Checking nginx -if [ ! -z "$SSL_CERT" ] && [ ! -z "$NGINX" ]; then +if [ ! -z "$SSL" ] && [ ! -z "$NGINX" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" replace_web_config diff --git a/bin/v_change_web_domain_sslcert b/bin/v_change_web_domain_sslcert index c068ef73b..0ed000b94 100755 --- a/bin/v_change_web_domain_sslcert +++ b/bin/v_change_web_domain_sslcert @@ -44,7 +44,7 @@ is_web_domain_valid is_domain_suspended 'web' # Check SSL is added -is_web_domain_value_exist '$SSL_CERT' +is_web_domain_value_exist '$SSL' # Checking ssl certificate is_web_domain_cert_valid @@ -58,8 +58,8 @@ is_web_domain_cert_valid get_web_domain_values tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" -old_ssl="$SSL_CERT" -SSL_CERT="$ssl" +old_ssl="$SSL" +SSL="$ssl" # Preparing domain values for the template substitution upd_web_domain_values @@ -78,11 +78,11 @@ if [ ! -z "$NGINX" ]; then fi # Adding new certificate to user dir -cp -f $V_USERS/$user/cert/$SSL_CERT.crt $ssl_cert -cp -f $V_USERS/$user/cert/$SSL_CERT.key $ssl_key +cp -f $V_USERS/$user/cert/$SSL.crt $ssl_cert +cp -f $V_USERS/$user/cert/$SSL.key $ssl_key # Deleting old certificate -check_cert=$(grep "SSL_CERT='$old_ssl'" $V_USERS/$user/web.conf |wc -l) +check_cert=$(grep "SSL='$old_ssl'" $V_USERS/$user/web.conf |wc -l) if [ "$check_cert" -lt 2 ]; then rm -f $V_HOME/$user/conf/$old_ssl.crt rm -f $V_HOME/$user/conf/$old_ssl.key @@ -94,7 +94,7 @@ fi #----------------------------------------------------------# # Adding sslcert in config -update_web_domain_value '$SSL_CERT' "$SSL_CERT" +update_web_domain_value '$SSL' "$SSL" # Adding task to the vesta pipe restart_schedule 'web' diff --git a/bin/v_change_web_domain_sslhome b/bin/v_change_web_domain_sslhome index dcd2bd1b3..2a493d3d1 100755 --- a/bin/v_change_web_domain_sslhome +++ b/bin/v_change_web_domain_sslhome @@ -44,7 +44,7 @@ is_web_domain_valid is_domain_suspended 'web' # Check SSL is added -is_web_domain_value_exist '$SSL_CERT' +is_web_domain_value_exist '$SSL' #----------------------------------------------------------# diff --git a/bin/v_change_web_domain_tpl b/bin/v_change_web_domain_tpl index 90254453f..ca78f1228 100755 --- a/bin/v_change_web_domain_tpl +++ b/bin/v_change_web_domain_tpl @@ -62,7 +62,7 @@ conf="$V_HOME/$user/conf/httpd.conf" del_web_config # Deleting ssl vhost -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -139,10 +139,10 @@ if [ -x $V_WEBTPL/apache_$template.sh ]; then fi # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then # Defining variables for ssl template replace - ssl_cert="$V_HOME/$user/conf/$SSL_CERT.crt" - ssl_key="$V_HOME/$user/conf/$SSL_CERT.key" + ssl_cert="$V_HOME/$user/conf/$SSL.crt" + ssl_key="$V_HOME/$user/conf/$SSL.key" case $SSL_HOME in single) docroot="$V_HOME/$user/web/$domain/public_shtml" ;; same) docroot="$V_HOME/$user/web/$domain/public_html" ;; diff --git a/bin/v_del_web_domain b/bin/v_del_web_domain index 6156b486e..d7de93756 100755 --- a/bin/v_del_web_domain +++ b/bin/v_del_web_domain @@ -57,16 +57,16 @@ conf="$V_HOME/$user/conf/httpd.conf" del_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config # Deleting old certificate - check_cert=$(grep "SSL_CERT='$SSL_CERT'" $V_USERS/$user/web.conf |wc -l) + check_cert=$(grep "SSL='$SSL'" $V_USERS/$user/web.conf |wc -l) if [ "$check_cert" -lt 2 ]; then - rm -f $V_HOME/$user/conf/$SSL_CERT.crt - rm -f $V_HOME/$user/conf/$SSL_CERT.key + rm -f $V_HOME/$user/conf/$SSL.crt + rm -f $V_HOME/$user/conf/$SSL.key fi fi @@ -77,7 +77,7 @@ if [ ! -z "$NGINX" ]; then conf="$V_HOME/$user/conf/nginx.conf" del_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" @@ -117,7 +117,7 @@ rm -rf /var/log/httpd/domains/$domain.error* del_web_domain # Checking last ssl domain -ssl_dom=$(grep -v "SSL_CERT=''" $V_USERS/$user/web.conf | wc -l) +ssl_dom=$(grep -v "SSL=''" $V_USERS/$user/web.conf | wc -l) if [ "$ssl_dom" -eq '0' ]; then sed -i "s/ Include /#Include /" $V_HOME/$user/conf/httpd.conf fi @@ -135,7 +135,7 @@ fi # Checking last nginx domain conf='/etc/nginx/conf.d/vesta_users.conf' last_nginx=$(grep -v "NGINX=''" $V_USERS/$user/web.conf) -last_snginx=$(echo "$last_nginx" | grep -v "SSL_CERT=''") +last_snginx=$(echo "$last_nginx" | grep -v "SSL=''") if [ -z "$last_snginx" ]; then sline=$(grep -n "$V_HOME/$user/conf/snginx.conf" $conf | cut -f 1 -d : ) if [ ! -z "$sline" ]; then diff --git a/bin/v_del_web_domain_alias b/bin/v_del_web_domain_alias index b524745f9..90466c4c9 100755 --- a/bin/v_del_web_domain_alias +++ b/bin/v_del_web_domain_alias @@ -73,7 +73,7 @@ upd_web_domain_values del_web_config add_web_config -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -87,7 +87,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_del_web_domain_cgi b/bin/v_del_web_domain_cgi index e36cf4502..a82396152 100755 --- a/bin/v_del_web_domain_cgi +++ b/bin/v_del_web_domain_cgi @@ -63,7 +63,7 @@ del_web_config add_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config diff --git a/bin/v_del_web_domain_elog b/bin/v_del_web_domain_elog index f7afb4511..2deac53ec 100755 --- a/bin/v_del_web_domain_elog +++ b/bin/v_del_web_domain_elog @@ -64,7 +64,7 @@ del_web_config add_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -78,7 +78,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_del_web_domain_nginx b/bin/v_del_web_domain_nginx index a984361d0..29ebb439c 100755 --- a/bin/v_del_web_domain_nginx +++ b/bin/v_del_web_domain_nginx @@ -57,7 +57,7 @@ conf="$V_HOME/$user/conf/nginx.conf" del_web_config # Checking ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" del_web_config @@ -75,7 +75,7 @@ update_web_domain_value '$NGINX_EXT' '' # Checking last nginx domain conf='/etc/nginx/conf.d/vesta_users.conf' last_nginx=$(grep -v "NGINX=''" $V_USERS/$user/web.conf) -last_snginx=$(echo "$last_nginx" | grep -v "SSL_CERT=''") +last_snginx=$(echo "$last_nginx" | grep -v "SSL=''") if [ -z "$last_snginx" ]; then sline=$(grep -n "$V_HOME/$user/conf/snginx.conf" $conf | cut -f 1 -d : ) if [ ! -z "$sline" ]; then diff --git a/bin/v_del_web_domain_ssl b/bin/v_del_web_domain_ssl index 01a242987..fe8fb9cb2 100755 --- a/bin/v_del_web_domain_ssl +++ b/bin/v_del_web_domain_ssl @@ -43,7 +43,7 @@ is_web_domain_valid is_domain_suspended 'web' # Checking ssl is added -is_web_domain_value_exist '$SSL_CERT' +is_web_domain_value_exist '$SSL' #----------------------------------------------------------# @@ -54,7 +54,7 @@ is_web_domain_value_exist '$SSL_CERT' get_web_domain_values conf="$V_HOME/$user/conf/shttpd.conf" tpl_file="$V_WEBTPL/apache_$TPL.stpl" -old_ssl="$SSL_CERT" +old_ssl="$SSL" # Deleting domain del_web_config @@ -67,7 +67,7 @@ if [ ! -z "$NGINX" ]; then fi # Deleting old certificate -check_cert=$(grep "SSL_CERT='$old_ssl'" $V_USERS/$user/web.conf |wc -l) +check_cert=$(grep "SSL='$old_ssl'" $V_USERS/$user/web.conf |wc -l) if [ "$check_cert" -lt 2 ]; then rm -f $V_HOME/$user/conf/$old_ssl.crt rm -f $V_HOME/$user/conf/$old_ssl.key @@ -79,11 +79,11 @@ fi #----------------------------------------------------------# # Deleting ssl in config +update_web_domain_value '$SSL' '' update_web_domain_value '$SSL_HOME' '' -update_web_domain_value '$SSL_CERT' '' # Checking last ssl domain -ssl_dom=$(grep -v "SSL_CERT=''" $V_USERS/$user/web.conf) +ssl_dom=$(grep -v "SSL=''" $V_USERS/$user/web.conf) main_conf='/etc/httpd/conf.d/vesta.conf' conf="$V_HOME/$user/conf/shttpd.conf" if [ -z "$ssl_dom" ]; then @@ -94,7 +94,7 @@ fi # Checking last nginx domain conf='/etc/nginx/conf.d/vesta_users.conf' last_nginx=$(grep -v "NGINX=''" $V_USERS/$user/web.conf) -last_snginx=$(echo "$last_nginx" | grep -v "SSL_CERT=''") +last_snginx=$(echo "$last_nginx" | grep -v "SSL=''") if [ -z "$last_snginx" ]; then sline=$(grep -n "$V_HOME/$user/conf/snginx.conf" $conf | cut -f 1 -d : ) if [ ! -z "$sline" ]; then @@ -110,7 +110,7 @@ decrease_user_value "$user" '$U_WEB_SSL' restart_schedule 'web' # Logging -log_history "$V_EVENT" "v_add_web_domain_ssl $user $domain $SSL_CERT $SSL_HOME" +log_history "$V_EVENT" "v_add_web_domain_ssl $user $domain $SSL $SSL_HOME" log_event 'system' "$V_EVENT" exit diff --git a/bin/v_list_web_domain b/bin/v_list_web_domain index fb699f5df..9f1e581dc 100755 --- a/bin/v_list_web_domain +++ b/bin/v_list_web_domain @@ -96,7 +96,7 @@ conf=$V_USERS/$user/web.conf # Defining fileds to select fields='$DOMAIN $IP $U_DISK $U_BANDWIDTH $TPL $ALIAS $PHP $CGI $ELOG $STATS - $STATS_AUTH $SSL_HOME $SSL_CERT $NGINX $NGINX_EXT $SUSPEND $DATE' + $STATS_AUTH $SSL $SSL_HOME $NGINX $NGINX_EXT $SUSPEND $DATE' # Listing domains case $format in diff --git a/bin/v_list_web_domains b/bin/v_list_web_domains index c4d00526e..3ae6d77b5 100755 --- a/bin/v_list_web_domains +++ b/bin/v_list_web_domains @@ -37,7 +37,7 @@ conf=$V_USERS/$user/web.conf # Defining fileds to select fields="\$DOMAIN \$IP \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS \$PHP \$CGI \$ELOG" -fields="$fields \$STATS \$STATS_AUTH \$SSL_HOME \$SSL_CERT \$NGINX \$NGINX_EXT" +fields="$fields \$STATS \$STATS_AUTH \$SSL \$SSL_HOME \$NGINX \$NGINX_EXT" fields="$fields \$SUSPEND \$DATE" # Listing domains diff --git a/bin/v_list_web_domains_ssl b/bin/v_list_web_domains_ssl index 61793af17..c7f837bc4 100755 --- a/bin/v_list_web_domains_ssl +++ b/bin/v_list_web_domains_ssl @@ -36,7 +36,7 @@ is_user_valid conf="$V_USERS/$user/web.conf" # Defining fileds to select -fields="\$DOMAIN \$SSL_HOME \$SSL_CERT" +fields="\$DOMAIN \$SSL \$SSL_HOME" # Listing domains case $format in diff --git a/bin/v_rebuild_web_domains b/bin/v_rebuild_web_domains index df86d6759..32ecd718b 100755 --- a/bin/v_rebuild_web_domains +++ b/bin/v_rebuild_web_domains @@ -70,7 +70,7 @@ for domain in $(shell_list) ; do fi # Checking ssl - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then # Adding domain to the shttpd.conf conf="$V_HOME/$user/conf/tmp_shttpd.conf" tpl_file="$V_WEBTPL/apache_$TPL.stpl" @@ -90,7 +90,7 @@ for domain in $(shell_list) ; do conf="$V_HOME/$user/conf/tmp_nginx.conf" add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then if [ "$SUSPEND" = 'yes' ]; then proxy_string="rewrite ^(.*)\$ http://$url;" else diff --git a/bin/v_suspend_web_domain b/bin/v_suspend_web_domain index e3c042d91..552d8d01c 100755 --- a/bin/v_suspend_web_domain +++ b/bin/v_suspend_web_domain @@ -61,7 +61,7 @@ del_web_config add_web_config # Check ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -75,7 +75,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="rewrite ^(.*)\$ http://$url;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/bin/v_unsuspend_web_domain b/bin/v_unsuspend_web_domain index db43bddd5..d6223d045 100755 --- a/bin/v_unsuspend_web_domain +++ b/bin/v_unsuspend_web_domain @@ -58,7 +58,7 @@ del_web_config add_web_config # Check ssl -if [ ! -z "$SSL_CERT" ]; then +if [ ! -z "$SSL" ]; then tpl_file="$V_WEBTPL/apache_$TPL.stpl" conf="$V_HOME/$user/conf/shttpd.conf" del_web_config @@ -72,7 +72,7 @@ if [ ! -z "$NGINX" ]; then del_web_config add_web_config - if [ ! -z "$SSL_CERT" ]; then + if [ ! -z "$SSL" ]; then proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;" tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl" conf="$V_HOME/$user/conf/snginx.conf" diff --git a/func/cert.func b/func/cert.func index 0037748df..a0bd9e8a4 100644 --- a/func/cert.func +++ b/func/cert.func @@ -65,7 +65,7 @@ is_cert_valid() { is_cert_used() { # Parsing config - check_cert=$(grep "SSL_CERT='$ssl'" $V_USERS/$user/web.conf) + check_cert=$(grep "SSL='$ssl'" $V_USERS/$user/*.conf) # Checking result if [ ! -z "$check_cert" ]; then diff --git a/func/domain.func b/func/domain.func index 2e7f51b59..422a68181 100644 --- a/func/domain.func +++ b/func/domain.func @@ -688,7 +688,7 @@ upd_web_domain_values() { else alias_string="$alias_string\n ServerAlias $server_alias" fi - (( ++j)) + j=2 server_alias='' fi if [ "$i" -eq 1 ]; then @@ -699,10 +699,10 @@ upd_web_domain_values() { aliases_idn="$aliases_idn,$dalias" server_alias="$server_alias $dalias" fi - (( ++i)) + i=2 done - if [ "$j" -gt 1 ]; then + if [ $j -gt 1 ]; then alias_string="$alias_string\n ServerAlias $server_alias" else alias_string="ServerAlias $server_alias" @@ -733,8 +733,8 @@ upd_web_domain_values() { fi # Defining SSL vars - ssl_cert="$V_HOME/$user/conf/$SSL_CERT.crt" - ssl_key="$V_HOME/$user/conf/$SSL_CERT.key" + ssl_cert="$V_HOME/$user/conf/$SSL.crt" + ssl_key="$V_HOME/$user/conf/$SSL.key" case $SSL_HOME in single) docroot="$V_HOME/$user/web/$domain/public_shtml" ;; same) docroot="$V_HOME/$user/web/$domain/public_html" ;;