Skip to content

Commit bba7b07

Browse files
author
Marius Burkard
committed
- fixed LE command order
1 parent a35a003 commit bba7b07

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

server/lib/classes/letsencrypt.inc.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,11 @@ public function request_certificates($data, $server_type = 'apache') {
254254
$cli_domain_arg .= (string) " --domains " . $temp_domain;
255255
}
256256

257-
$le_files = $this->get_letsencrypt_certificate_paths($temp_domains);
258-
259257
// unset useless data
260258
unset($subdomains);
261259
unset($aliasdomains);
262260
unset($temp_domains);
263261

264-
if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
265-
$crt_tmp_file = $le_files['fullchain'];
266-
} else {
267-
$crt_tmp_file = $le_files['cert'];
268-
}
269-
270-
$key_tmp_file = $le_files['privkey'];
271-
$bundle_tmp_file = $le_files['chain'];
272-
273262
$letsencrypt_cmd = '';
274263
$success = false;
275264
if(!empty($cli_domain_arg)) {
@@ -284,6 +273,17 @@ public function request_certificates($data, $server_type = 'apache') {
284273
}
285274
}
286275

276+
$le_files = $this->get_letsencrypt_certificate_paths($temp_domains);
277+
278+
if($server_type != 'apache' || version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
279+
$crt_tmp_file = $le_files['fullchain'];
280+
} else {
281+
$crt_tmp_file = $le_files['cert'];
282+
}
283+
284+
$key_tmp_file = $le_files['privkey'];
285+
$bundle_tmp_file = $le_files['chain'];
286+
287287
if(!$success) {
288288
// error issuing cert
289289
$app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN);

0 commit comments

Comments
 (0)