From d50aff81fc7ee783ed7c14a651ba52ebfc4156ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Sun, 9 Aug 2020 23:23:39 +0200 Subject: [PATCH] adding --- app/Commands/LetsEncryptRemoveCommand.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Commands/LetsEncryptRemoveCommand.php b/app/Commands/LetsEncryptRemoveCommand.php index 7af1bb1..fb670a6 100644 --- a/app/Commands/LetsEncryptRemoveCommand.php +++ b/app/Commands/LetsEncryptRemoveCommand.php @@ -52,11 +52,16 @@ class LetsEncryptRemoveCommand extends Command $errors = 0; foreach($directories as $key => $directory) { + + if ($key === 'renewal') { + $directory .= $directory.'.conf'; + } + if (!file_exists($directory)) { $errors++; } else { - if ($key === 'renewal') { - exec('rm '.$directory.'.conf 2>&1', $output); + if (is_file($directory)) { + exec('rm '.$directory.' 2>&1', $output); } else { exec('rm -rf '.$directory.' 2>&1', $output); }