Skip to content
Snippets Groups Projects
Commit bba7b07c authored by Marius Burkard's avatar Marius Burkard
Browse files

- fixed LE command order

parent a35a0032
No related branches found
No related tags found
No related merge requests found
......@@ -254,22 +254,11 @@ class letsencrypt {
$cli_domain_arg .= (string) " --domains " . $temp_domain;
}
$le_files = $this->get_letsencrypt_certificate_paths($temp_domains);
// unset useless data
unset($subdomains);
unset($aliasdomains);
unset($temp_domains);
if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
$crt_tmp_file = $le_files['fullchain'];
} else {
$crt_tmp_file = $le_files['cert'];
}
$key_tmp_file = $le_files['privkey'];
$bundle_tmp_file = $le_files['chain'];
$letsencrypt_cmd = '';
$success = false;
if(!empty($cli_domain_arg)) {
......@@ -284,6 +273,17 @@ class letsencrypt {
}
}
$le_files = $this->get_letsencrypt_certificate_paths($temp_domains);
if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
$crt_tmp_file = $le_files['fullchain'];
} else {
$crt_tmp_file = $le_files['cert'];
}
$key_tmp_file = $le_files['privkey'];
$bundle_tmp_file = $le_files['chain'];
if(!$success) {
// error issuing cert
$app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment