|
@ -52,11 +52,16 @@ class LetsEncryptRemoveCommand extends Command |
|
|
$errors = 0; |
|
|
$errors = 0; |
|
|
|
|
|
|
|
|
foreach($directories as $key => $directory) { |
|
|
foreach($directories as $key => $directory) { |
|
|
|
|
|
|
|
|
|
|
|
if ($key === 'renewal') { |
|
|
|
|
|
$directory .= $directory.'.conf'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!file_exists($directory)) { |
|
|
if (!file_exists($directory)) { |
|
|
$errors++; |
|
|
$errors++; |
|
|
} else { |
|
|
} else { |
|
|
if ($key === 'renewal') { |
|
|
|
|
|
exec('rm '.$directory.'.conf 2>&1', $output); |
|
|
|
|
|
|
|
|
if (is_file($directory)) { |
|
|
|
|
|
exec('rm '.$directory.' 2>&1', $output); |
|
|
} else { |
|
|
} else { |
|
|
exec('rm -rf '.$directory.' 2>&1', $output); |
|
|
exec('rm -rf '.$directory.' 2>&1', $output); |
|
|
} |
|
|
} |
|
|