Commit d8b99a8b authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '6148-consistent-acme-log-path' into 'develop'

Resolve "consistent acme.log path"

Closes #6148

See merge request !1473
parents d0869c58 c6d1c5d9
Pipeline #9229 passed with stage
in 14 seconds
......@@ -2895,8 +2895,13 @@ class installer_base {
$check_acme_file = $acme_cert_dir . '/cert.pem';
}
}
swriteln('Using certificate path ' . $acme_cert_dir);
if(!is_dir($conf['ispconfig_log_dir'])) {
mkdir($conf['ispconfig_log_dir'], 0755, true);
}
$acme_log = $conf['ispconfig_log_dir'] . '/acme.log';
$ip_address_match = false;
if(!(($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
swriteln('Server\'s public ip(s) (' . $svr_ip4 . ($svr_ip6 ? ', ' . $svr_ip6 : '') . ') not found in A/AAAA records for ' . $hostname . ': ' . implode(', ', $dns_ips));
......@@ -3024,11 +3029,11 @@ class installer_base {
$out = null;
$ret = null;
if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
exec("$acme --issue -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
exec("$acme --issue --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
}
// Else, it is not webserver, so we use standalone
else {
exec("$acme --issue --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
exec("$acme --issue --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
}
if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) {
......@@ -3040,7 +3045,7 @@ class installer_base {
//$acme_cert = "--cert-file $acme_cert_dir/cert.pem";
$acme_key = "--key-file " . escapeshellarg($ssl_key_file);
$acme_chain = "--fullchain-file " . escapeshellarg($ssl_crt_file);
exec("$acme --install-cert -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
exec("$acme --install-cert --log $acme_log -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
$issued_successfully = true;
umask($old_umask);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment