File tree Expand file tree Collapse file tree 8 files changed +17
-17
lines changed
Expand file tree Collapse file tree 8 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ touch $V_USERS/$user/user.conf
103103echo " v_upd_sys_user_disk $user " >> $V_QUEUE /disk.pipe
104104
105105if [ ! -z " $WEB_SYSTEM " ] && [ " $WEB_SYSTEM " != ' no' ]; then
106- mkdir $V_USERS /$user /cert
106+ mkdir $V_USERS /$user /ssl
107107 touch $V_USERS /$user /web.conf
108108 echo " $V_BIN /v_upd_web_domains_traff $user " >> $V_QUEUE /traffic.pipe
109109 echo " v_upd_web_domains_disk $user " >> $V_QUEUE /disk.pipe
Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ ssl=$2
1313source $VESTA /conf/vars.conf
1414source $V_CONF /vesta.conf
1515source $V_FUNC /shared.func
16- source $V_FUNC /cert .func
16+ source $V_FUNC /ssl .func
1717
1818# ----------------------------------------------------------#
1919# Verifications #
2020# ----------------------------------------------------------#
2121
2222# Checking arg number
23- check_args ' 2' " $# " ' user ssl_certificate '
23+ check_args ' 2' " $# " ' user ssl '
2424
2525# Checking argument format
2626format_validation ' user' ' ssl'
@@ -43,16 +43,16 @@ is_cert_valid "$V_TMP"
4343# ----------------------------------------------------------#
4444
4545# Adding certificate to user dir
46- mv $V_TMP /$ssl .crt $V_USERS /$user /cert /
47- mv $V_TMP /$ssl .key $V_USERS /$user /cert /
46+ mv $V_TMP /$ssl .crt $V_USERS /$user /ssl /
47+ mv $V_TMP /$ssl .key $V_USERS /$user /ssl /
4848
4949
5050# ----------------------------------------------------------#
5151# Vesta #
5252# ----------------------------------------------------------#
5353
5454# Logging
55- log_history " $V_EVENT " " v_del_ssl_certificate $user $ssl "
55+ log_history " $V_EVENT " " v_del_sys_user_ssl $user $ssl "
5656log_event ' system' " $V_EVENT "
5757
5858exit
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ source $V_FUNC/ip.func
2525# ----------------------------------------------------------#
2626
2727# Checking arg number
28- check_args ' 3' " $# " ' user domain certificate [sslhome]'
28+ check_args ' 3' " $# " ' user domain ssl [sslhome]'
2929
3030# Checking argument format
3131format_validation ' user' ' domain' ' ssl'
@@ -76,8 +76,8 @@ upd_web_domain_values
7676add_web_config
7777
7878# Adding certificate to user dir
79- cp -f $V_USERS /$user /cert /$SSL .crt $ssl_cert
80- cp -f $V_USERS /$user /cert /$SSL .key $ssl_key
79+ cp -f $V_USERS /$user /ssl /$SSL .crt $ssl_cert
80+ cp -f $V_USERS /$user /ssl /$SSL .key $ssl_key
8181
8282# Running template trigger
8383if [ -x $V_WEBTPL /apache_$template .sh ]; then
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ if [ ! -z "$NGINX" ]; then
7878fi
7979
8080# Adding new certificate to user dir
81- cp -f $V_USERS /$user /cert /$SSL .crt $ssl_cert
82- cp -f $V_USERS /$user /cert /$SSL .key $ssl_key
81+ cp -f $V_USERS /$user /ssl /$SSL .crt $ssl_cert
82+ cp -f $V_USERS /$user /ssl /$SSL .key $ssl_key
8383
8484# Deleting old certificate
8585check_cert=$( grep " SSL='$old_ssl '" $V_USERS /$user /web.conf | wc -l)
Original file line number Diff line number Diff line change 1313source $VESTA /conf/vars.conf
1414source $V_CONF /vesta.conf
1515source $V_FUNC /shared.func
16- source $V_FUNC /cert .func
16+ source $V_FUNC /ssl .func
1717
1818
1919# ----------------------------------------------------------#
@@ -41,7 +41,7 @@ is_cert_used
4141# ----------------------------------------------------------#
4242
4343# Deleting certificate
44- rm -f $V_USERS /$user /cert /$ssl .*
44+ rm -f $V_USERS /$user /ssl /$ssl .*
4545
4646
4747# ----------------------------------------------------------#
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ json_list_cert() {
1919 echo ' ['
2020
2121 # Checking certificates number
22- certificates=$( ls $V_USERS /$user /cert / | grep ' .crt' )
22+ certificates=$( ls $V_USERS /$user /ssl / | grep ' .crt' )
2323 certificates_count=$( echo " $certificates " | wc -l)
2424 i=1
2525
@@ -46,7 +46,7 @@ shell_list_cert() {
4646 fi
4747
4848 # Listing files by mask
49- for cert in $( ls $V_USERS /$user /cert / | grep ' .crt' ) ; do
49+ for cert in $( ls $V_USERS /$user /ssl / | grep ' .crt' ) ; do
5050 # Print result
5151 echo " ${cert// .crt/ } "
5252 done
Original file line number Diff line number Diff line change @@ -449,7 +449,7 @@ is_web_domain_key_empty() {
449449
450450is_web_domain_cert_valid() {
451451 # Checking file existance
452- path="$V_USERS/$user/cert "
452+ path="$V_USERS/$user/ssl "
453453 if [ ! -e "$path/$ssl.crt" ] || [ ! -e "$path/$ssl.key" ]; then
454454 echo "Error: certificate not exist"
455455 log_event 'debug' "$E_CERT_NOTEXIST $V_EVENT"
Original file line number Diff line number Diff line change 11is_cert_free() {
22 # Defining path
3- user_cert="$V_USERS/$user/cert /$cert"
3+ user_cert="$V_USERS/$user/ssl /$cert"
44
55 # Checking file existance
66 if [ -e "$user_cert.crt" ] || [ -e "$user_cert.key" ]; then
You can’t perform that action at this time.
0 commit comments