|
|
@ -43,7 +43,7 @@ class LetsEncryptRemoveCommand extends Command |
|
|
|
$domains = $this->argument('domain'); |
|
|
|
|
|
|
|
foreach($domains as $domain) { |
|
|
|
$diretories = [ |
|
|
|
$directories = [ |
|
|
|
'archive' => self::CERT_DIR.'archive/'.$domain, |
|
|
|
'live' => self::CERT_DIR.'live/'.$domain, |
|
|
|
'renwal' => self::CERT_DIR.'renewal/'.$domain |
|
|
@ -51,19 +51,19 @@ class LetsEncryptRemoveCommand extends Command |
|
|
|
|
|
|
|
$errors = 0; |
|
|
|
|
|
|
|
foreach($diretories as $diretory) { |
|
|
|
if (!file_exists($diretory)) { |
|
|
|
foreach($directories as $directory) { |
|
|
|
if (!file_exists($directory)) { |
|
|
|
$errors++; |
|
|
|
} else { |
|
|
|
rmdir($diretory); |
|
|
|
rmdir($directory); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($errors === (count($diretories) - 1)) { |
|
|
|
if ($errors === count($directories)) { |
|
|
|
$this->error('Error! Certificate for '.$domain.'...not found!'); |
|
|
|
} |
|
|
|
|
|
|
|
if ($errors > 0 && $errors < (count($diretories) - 1)) { |
|
|
|
if ($errors > 0 && $errors < count($directories)) { |
|
|
|
$this->error('Trouble! Certificate for '.$domain.'...delete! Some files were not found!'); |
|
|
|
} |
|
|
|
|
|
|
|