@@ -2895,8 +2895,13 @@ public function make_ispconfig_ssl_cert() {
28952895 $ check_acme_file = $ acme_cert_dir . '/cert.pem ' ;
28962896 }
28972897 }
2898-
28992898 swriteln ('Using certificate path ' . $ acme_cert_dir );
2899+
2900+ if (!is_dir ($ conf ['ispconfig_log_dir ' ])) {
2901+ mkdir ($ conf ['ispconfig_log_dir ' ], 0755 , true );
2902+ }
2903+ $ acme_log = $ conf ['ispconfig_log_dir ' ] . '/acme.log ' ;
2904+
29002905 $ ip_address_match = false ;
29012906 if (!(($ svr_ip4 && in_array ($ svr_ip4 , $ dns_ips )) || ($ svr_ip6 && in_array ($ svr_ip6 , $ dns_ips )))) {
29022907 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 @@ public function make_ispconfig_ssl_cert() {
30243029 $ out = null ;
30253030 $ ret = null ;
30263031 if ($ conf ['nginx ' ]['installed ' ] == true || $ conf ['apache ' ]['installed ' ] == true ) {
3027- exec ("$ acme --issue -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg ($ hostname ) . " $ renew_hook " , $ out , $ ret );
3032+ exec ("$ acme --issue --log $ acme_log - w /usr/local/ispconfig/interface/acme -d " . escapeshellarg ($ hostname ) . " $ renew_hook " , $ out , $ ret );
30283033 }
30293034 // Else, it is not webserver, so we use standalone
30303035 else {
3031- exec ("$ acme --issue --standalone -d " . escapeshellarg ($ hostname ) . " $ hook " , $ out , $ ret );
3036+ exec ("$ acme --issue --log $ acme_log -- standalone -d " . escapeshellarg ($ hostname ) . " $ hook " , $ out , $ ret );
30323037 }
30333038
30343039 if ($ ret == 0 || ($ ret == 2 && file_exists ($ check_acme_file ))) {
@@ -3040,7 +3045,7 @@ public function make_ispconfig_ssl_cert() {
30403045 //$acme_cert = "--cert-file $acme_cert_dir/cert.pem";
30413046 $ acme_key = "--key-file " . escapeshellarg ($ ssl_key_file );
30423047 $ acme_chain = "--fullchain-file " . escapeshellarg ($ ssl_crt_file );
3043- exec ("$ acme --install-cert -d " . escapeshellarg ($ hostname ) . " $ acme_key $ acme_chain " );
3048+ exec ("$ acme --install-cert --log $ acme_log - d " . escapeshellarg ($ hostname ) . " $ acme_key $ acme_chain " );
30443049 $ issued_successfully = true ;
30453050 umask ($ old_umask );
30463051
0 commit comments