Skip to content

Commit c6d1c5d

Browse files
committed
set acme.log path in installer
1 parent 99e2f0a commit c6d1c5d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

install/lib/installer_base.lib.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,8 +2886,13 @@ public function make_ispconfig_ssl_cert() {
28862886
$check_acme_file = $acme_cert_dir . '/cert.pem';
28872887
}
28882888
}
2889-
28902889
swriteln('Using certificate path ' . $acme_cert_dir);
2890+
2891+
if(!is_dir($conf['ispconfig_log_dir'])) {
2892+
mkdir($conf['ispconfig_log_dir'], 0755, true);
2893+
}
2894+
$acme_log = $conf['ispconfig_log_dir'] . '/acme.log';
2895+
28912896
$ip_address_match = false;
28922897
if(!(($svr_ip4 && in_array($svr_ip4, $dns_ips)) || ($svr_ip6 && in_array($svr_ip6, $dns_ips)))) {
28932898
swriteln('Server\'s public ip(s) (' . $svr_ip4 . ($svr_ip6 ? ', ' . $svr_ip6 : '') . ') not found in A/AAAA records for ' . $hostname . ': ' . implode(', ', $dns_ips));
@@ -3015,11 +3020,11 @@ public function make_ispconfig_ssl_cert() {
30153020
$out = null;
30163021
$ret = null;
30173022
if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
3018-
exec("$acme --issue -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
3023+
exec("$acme --issue --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
30193024
}
30203025
// Else, it is not webserver, so we use standalone
30213026
else {
3022-
exec("$acme --issue --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
3027+
exec("$acme --issue --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
30233028
}
30243029

30253030
if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) {
@@ -3031,7 +3036,7 @@ public function make_ispconfig_ssl_cert() {
30313036
//$acme_cert = "--cert-file $acme_cert_dir/cert.pem";
30323037
$acme_key = "--key-file " . escapeshellarg($ssl_key_file);
30333038
$acme_chain = "--fullchain-file " . escapeshellarg($ssl_crt_file);
3034-
exec("$acme --install-cert -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
3039+
exec("$acme --install-cert --log $acme_log -d " . escapeshellarg($hostname) . " $acme_key $acme_chain");
30353040
$issued_successfully = true;
30363041
umask($old_umask);
30373042

0 commit comments

Comments
 (0)