File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -360,13 +360,15 @@ nonce=$(echo "$answer" |grep -i nonce |cut -f2 -d \ |tr -d '\r\n')
360360status= $( echo " $answer " | grep HTTP/ | tail -n1 | cut -f 2 -d ' ' )
361361certificate= $( echo " $answer " | grep ' certificate":' | cut -f4 -d ' "' )
362362if [[ " $status " -ne 200 ]]; then
363+ [ -d " $ssl_dir " ] && rm -rf " $ssl_dir "
363364 check_result $E_CONNECT " Let's Encrypt finalize bad status $status "
364365fi
365366
366367# Downloading signed certificate / STEP 7
367368answer= $( query_le_v2 " $certificate " " " " $nonce " " $ssl_dir /$domain .pem" )
368369status= $( echo " $answer " | grep HTTP/ | tail -n1 | cut -f 2 -d ' ' )
369370if [[ " $status " -ne 200 ]]; then
371+ [ -d " $ssl_dir " ] && rm -rf " $ssl_dir "
370372 check_result $E_NOTEXIST " Let's Encrypt downloading signed cert failed status:$status "
371373fi
372374
408410fi
409411
410412if [ " $? " -ne ' 0' ]; then
413+ [ -d " $ssl_dir " ] && rm -rf " $ssl_dir "
411414 touch $HESTIA /data/queue/letsencrypt.pipe
412415 sed -i " / $domain /d" $HESTIA /data/queue/letsencrypt.pipe
413416 send_notice ' LETSENCRYPT' " $domain certificate installation failed"
@@ -440,6 +443,9 @@ if [ ! -z "$well_known" ]; then
440443 rm -fr $well_known
441444fi
442445
446+ # Remove temporary SSL folder
447+ [ -d " $ssl_dir " ] && rm -r f " $ssl_dir "
448+
443449# ----------------------------------------------------------#
444450# Hestia #
445451# ----------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments