Browse Source

adding

release/0.1
Björn 4 years ago
parent
commit
1d254f794d
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      app/Commands/LetsEncryptRemoveCommand.php

+ 6
- 6
app/Commands/LetsEncryptRemoveCommand.php View File

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


Loading…
Cancel
Save