diff --git a/app/Commands/LetsEncryptRemoveCommand.php b/app/Commands/LetsEncryptRemoveCommand.php index 1347a83..7af1bb1 100644 --- a/app/Commands/LetsEncryptRemoveCommand.php +++ b/app/Commands/LetsEncryptRemoveCommand.php @@ -51,11 +51,15 @@ class LetsEncryptRemoveCommand extends Command $errors = 0; - foreach($directories as $directory) { + foreach($directories as $key => $directory) { if (!file_exists($directory)) { $errors++; } else { - exec('rm -rf '.$directory.' 2&>1', $output); + if ($key === 'renewal') { + exec('rm '.$directory.'.conf 2>&1', $output); + } else { + exec('rm -rf '.$directory.' 2>&1', $output); + } } }