Skip to content

Commit e26cc8c

Browse files
committed
added cert removal function
1 parent 4048e82 commit e26cc8c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/v_del_web_domain_ssl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ fi
8383
# Decreasing domain value
8484
decrease_user_value "$user" '$U_WEB_SSL'
8585

86+
# Checking cert parents
87+
conf="$V_USERS/$user/web_domains.conf"
88+
field='$DOMAIN'
89+
search_string="SSL_CERT='$cert'"
90+
cert_parents=$(dom_clear_search)
91+
if [ -z "$cert_parents" ]; then
92+
rm -f $V_HOME/$user/conf/$cert.crt $V_HOME/$user/conf/$cert.key
93+
fi
94+
8695
# Adding task to the vesta pipe
8796
restart_schedule 'web'
8897

0 commit comments

Comments
 (0)