Skip to content

Commit 1507808

Browse files
committed
Merge branch 'mrrobot47-fix/complete-cert-deletion' into develop
2 parents aff7bdd + 7431fd5 commit 1507808

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Site_Command.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,17 @@ private function delete_site() {
954954
if ( $this->level > 4 ) {
955955
if ( $this->le ) {
956956
EE::log( 'Removing ssl certs.' );
957-
$crt_file = EE_CONF_ROOT . "/nginx/certs/$this->site_name.crt";
958-
$key_file = EE_CONF_ROOT . "/nginx/certs/$this->site_name.key";
957+
$crt_file = EE_CONF_ROOT . "/nginx/certs/$this->site_name.crt";
958+
$key_file = EE_CONF_ROOT . "/nginx/certs/$this->site_name.key";
959+
$conf_certs = EE_CONF_ROOT . "/acme-conf/certs/$this->site_name";
960+
$conf_var = EE_CONF_ROOT . "/acme-conf/var/$this->site_name";
961+
// TODO: Change all these operations to use symfony filesystem
962+
if ( file_exists( $conf_certs ) ) {
963+
\EE\Utils\delete_dir( $conf_certs );
964+
}
965+
if ( file_exists( $conf_var ) ) {
966+
\EE\Utils\delete_dir( $conf_var );
967+
}
959968
if ( file_exists( $crt_file ) ) {
960969
unlink( $crt_file );
961970
}

0 commit comments

Comments
 (0)