Skip to content

Commit 30d1240

Browse files
committed
renamed SSL_CERT to SSL
1 parent 8c288a2 commit 30d1240

24 files changed

+62
-62
lines changed

bin/v_add_web_domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ v_str="$v_str TPL='$template'"
205205
v_str="$v_str ALIAS='$aliases'"
206206
v_str="$v_str $template_data" # Inserting PHP, CGI and ELOG keys
207207
v_str="$v_str STATS='' STATS_AUTH=''"
208-
v_str="$v_str SSL_HOME='' SSL_CERT=''"
208+
v_str="$v_str SSL='' SSL_HOME=''"
209209
v_str="$v_str NGINX='' NGINX_EXT='' SUSPEND='no' DATE='$V_DATE'"
210210

211211
# Registering domain

bin/v_add_web_domain_alias

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ upd_web_domain_values
8282
del_web_config
8383
add_web_config
8484

85-
if [ ! -z "$SSL_CERT" ]; then
85+
if [ ! -z "$SSL" ]; then
8686
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
8787
conf="$V_HOME/$user/conf/shttpd.conf"
8888
del_web_config
@@ -96,7 +96,7 @@ if [ ! -z "$NGINX" ]; then
9696
del_web_config
9797
add_web_config
9898

99-
if [ ! -z "$SSL_CERT" ]; then
99+
if [ ! -z "$SSL" ]; then
100100
proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;"
101101
tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl"
102102
conf="$V_HOME/$user/conf/snginx.conf"

bin/v_add_web_domain_cgi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ del_web_config
6464
add_web_config
6565

6666
# Checking ssl
67-
if [ ! -z "$SSL_CERT" ]; then
67+
if [ ! -z "$SSL" ]; then
6868
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
6969
conf="$V_HOME/$user/conf/shttpd.conf"
7070
del_web_config

bin/v_add_web_domain_elog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ del_web_config
6464
add_web_config
6565

6666
# Checking ssl
67-
if [ ! -z "$SSL_CERT" ]; then
67+
if [ ! -z "$SSL" ]; then
6868
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
6969
conf="$V_HOME/$user/conf/shttpd.conf"
7070
del_web_config
@@ -78,7 +78,7 @@ if [ ! -z "$NGINX" ]; then
7878
del_web_config
7979
add_web_config
8080

81-
if [ ! -z "$SSL_CERT" ]; then
81+
if [ ! -z "$SSL" ]; then
8282
proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;"
8383
tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl"
8484
conf="$V_HOME/$user/conf/snginx.conf"

bin/v_add_web_domain_nginx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ conf="$V_HOME/$user/conf/nginx.conf"
6868
upd_web_domain_values
6969
add_web_config
7070

71-
if [ ! -z "$SSL_CERT" ]; then
71+
if [ ! -z "$SSL" ]; then
7272
proxy_string="proxy_pass https://$ip:$WEB_SSL_PORT;"
7373
tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl"
7474
conf="$V_HOME/$user/conf/snginx.conf"

bin/v_add_web_domain_ssl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ is_domain_suspended 'web'
4949
is_package_full 'web_ssl'
5050

5151
# Check ssl is not added
52-
is_web_domain_key_empty '$SSL_CERT'
52+
is_web_domain_key_empty '$SSL'
5353

5454
# Checking ssl certificate
5555
is_web_domain_cert_valid
@@ -63,7 +63,7 @@ is_web_domain_cert_valid
6363
get_web_domain_values
6464
conf="$V_HOME/$user/conf/shttpd.conf"
6565
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
66-
SSL_CERT=$ssl
66+
SSL=$ssl
6767
SSL_HOME=$ssl_home
6868

6969
# Checking ip ownership
@@ -76,8 +76,8 @@ upd_web_domain_values
7676
add_web_config
7777

7878
# Adding certificate to user dir
79-
cp -f $V_USERS/$user/cert/$SSL_CERT.crt $ssl_cert
80-
cp -f $V_USERS/$user/cert/$SSL_CERT.key $ssl_key
79+
cp -f $V_USERS/$user/cert/$SSL.crt $ssl_cert
80+
cp -f $V_USERS/$user/cert/$SSL.key $ssl_key
8181

8282
# Running template trigger
8383
if [ -x $V_WEBTPL/apache_$template.sh ]; then
@@ -115,7 +115,7 @@ fi
115115
increase_user_value "$user" '$U_WEB_SSL'
116116

117117
# Adding ssl values
118-
update_web_domain_value '$SSL_CERT' "$SSL_CERT"
118+
update_web_domain_value '$SSL' "$SSL"
119119
update_web_domain_value '$SSL_HOME' "$SSL_HOME"
120120

121121
# Logging

bin/v_change_web_domain_ip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ new=$ip
6161
replace_web_config
6262

6363
# Checking ssl
64-
if [ ! -z "$SSL_CERT" ]; then
64+
if [ ! -z "$SSL" ]; then
6565
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
6666
conf="$V_HOME/$user/conf/shttpd.conf"
6767
replace_web_config
@@ -75,7 +75,7 @@ if [ ! -z "$NGINX" ]; then
7575
fi
7676

7777
# Checking nginx
78-
if [ ! -z "$SSL_CERT" ] && [ ! -z "$NGINX" ]; then
78+
if [ ! -z "$SSL" ] && [ ! -z "$NGINX" ]; then
7979
tpl_file="$V_WEBTPL/ngingx_vhost_$NGINX.stpl"
8080
conf="$V_HOME/$user/conf/snginx.conf"
8181
replace_web_config

bin/v_change_web_domain_sslcert

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ is_web_domain_valid
4444
is_domain_suspended 'web'
4545

4646
# Check SSL is added
47-
is_web_domain_value_exist '$SSL_CERT'
47+
is_web_domain_value_exist '$SSL'
4848

4949
# Checking ssl certificate
5050
is_web_domain_cert_valid
@@ -58,8 +58,8 @@ is_web_domain_cert_valid
5858
get_web_domain_values
5959
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
6060
conf="$V_HOME/$user/conf/shttpd.conf"
61-
old_ssl="$SSL_CERT"
62-
SSL_CERT="$ssl"
61+
old_ssl="$SSL"
62+
SSL="$ssl"
6363

6464
# Preparing domain values for the template substitution
6565
upd_web_domain_values
@@ -78,11 +78,11 @@ if [ ! -z "$NGINX" ]; then
7878
fi
7979

8080
# Adding new certificate to user dir
81-
cp -f $V_USERS/$user/cert/$SSL_CERT.crt $ssl_cert
82-
cp -f $V_USERS/$user/cert/$SSL_CERT.key $ssl_key
81+
cp -f $V_USERS/$user/cert/$SSL.crt $ssl_cert
82+
cp -f $V_USERS/$user/cert/$SSL.key $ssl_key
8383

8484
# Deleting old certificate
85-
check_cert=$(grep "SSL_CERT='$old_ssl'" $V_USERS/$user/web.conf |wc -l)
85+
check_cert=$(grep "SSL='$old_ssl'" $V_USERS/$user/web.conf |wc -l)
8686
if [ "$check_cert" -lt 2 ]; then
8787
rm -f $V_HOME/$user/conf/$old_ssl.crt
8888
rm -f $V_HOME/$user/conf/$old_ssl.key
@@ -94,7 +94,7 @@ fi
9494
#----------------------------------------------------------#
9595

9696
# Adding sslcert in config
97-
update_web_domain_value '$SSL_CERT' "$SSL_CERT"
97+
update_web_domain_value '$SSL' "$SSL"
9898

9999
# Adding task to the vesta pipe
100100
restart_schedule 'web'

bin/v_change_web_domain_sslhome

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ is_web_domain_valid
4444
is_domain_suspended 'web'
4545

4646
# Check SSL is added
47-
is_web_domain_value_exist '$SSL_CERT'
47+
is_web_domain_value_exist '$SSL'
4848

4949

5050
#----------------------------------------------------------#

bin/v_change_web_domain_tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ conf="$V_HOME/$user/conf/httpd.conf"
6262
del_web_config
6363

6464
# Deleting ssl vhost
65-
if [ ! -z "$SSL_CERT" ]; then
65+
if [ ! -z "$SSL" ]; then
6666
tpl_file="$V_WEBTPL/apache_$TPL.stpl"
6767
conf="$V_HOME/$user/conf/shttpd.conf"
6868
del_web_config
@@ -139,10 +139,10 @@ if [ -x $V_WEBTPL/apache_$template.sh ]; then
139139
fi
140140

141141
# Checking ssl
142-
if [ ! -z "$SSL_CERT" ]; then
142+
if [ ! -z "$SSL" ]; then
143143
# Defining variables for ssl template replace
144-
ssl_cert="$V_HOME/$user/conf/$SSL_CERT.crt"
145-
ssl_key="$V_HOME/$user/conf/$SSL_CERT.key"
144+
ssl_cert="$V_HOME/$user/conf/$SSL.crt"
145+
ssl_key="$V_HOME/$user/conf/$SSL.key"
146146
case $SSL_HOME in
147147
single) docroot="$V_HOME/$user/web/$domain/public_shtml" ;;
148148
same) docroot="$V_HOME/$user/web/$domain/public_html" ;;

0 commit comments

Comments
 (0)