|
|
@ -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); |
|
|
|
} |
|
|
|