From 1d254f794d0e92c7d79e524b251a86f9e9f9ef04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Sun, 9 Aug 2020 23:01:36 +0200 Subject: [PATCH] adding --- app/Commands/LetsEncryptRemoveCommand.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Commands/LetsEncryptRemoveCommand.php b/app/Commands/LetsEncryptRemoveCommand.php index 94f5ad4..14ab54e 100644 --- a/app/Commands/LetsEncryptRemoveCommand.php +++ b/app/Commands/LetsEncryptRemoveCommand.php @@ -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!'); }