From 80ba3cc760417f2aa2b679b88a62b03cd8d5a6d2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 10 Nov 2016 23:17:52 +0100 Subject: other name for files seems not to work correctly --- src/server/plugins-available/apache2_plugin.inc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/server/plugins-available/apache2_plugin.inc.php b/src/server/plugins-available/apache2_plugin.inc.php index 4717606..d5aabe2 100755 --- a/src/server/plugins-available/apache2_plugin.inc.php +++ b/src/server/plugins-available/apache2_plugin.inc.php @@ -955,10 +955,10 @@ class apache2_plugin { $data['new']['ssl_domain'] = $domain; $vhost_data['ssl_domain'] = $domain; - $key_file = $ssl_dir.'/'.$domain.'-le.key'; - $key_file2 = $ssl_dir.'/'.$domain.'-le.key.org'; - $crt_file = $ssl_dir.'/'.$domain.'-le.crt'; - $bundle_file = $ssl_dir.'/'.$domain.'-le.bundle'; + $key_file = $ssl_dir.'/'.$domain.'.key'; + $key_file2 = $ssl_dir.'/'.$domain.'.key.org'; + $crt_file = $ssl_dir.'/'.$domain.'.crt'; + $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; } $vhost_data['ssl_crt_file'] = $crt_file; @@ -1037,9 +1037,10 @@ class apache2_plugin { $letsencrypt = explode("\n", shell_exec('which acme.sh /etc/acme.sh/acme.sh')); $letsencrypt = reset($letsencrypt); if(is_executable($letsencrypt)) { + $app->log($letsencrypt . " --issue --domain $lddomain --webroot $webroot --log", LOGLEVEL_DEBUG); $success = $this->_exec($letsencrypt . " --issue --domain $lddomain --webroot $webroot --log"); } - if(!$success) { + if(!file_exists($crt_tmp_file) || !file_exists($key_tmp_file) || !file_exists($bundle_tmp_file)) { // error issuing cert $app->log('Let\'s Encrypt SSL Cert for: ' . $domain . ' could not be issued.', LOGLEVEL_WARN); $data['new']['ssl_letsencrypt'] = 'n'; -- cgit v1.2.3