Commit 7668f973 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'stable-3.1' into 'stable-3.1'

Stable 3.1



See merge request !525
parents 0f9fa27a 6c07a965
...@@ -1255,13 +1255,14 @@ class apache2_plugin { ...@@ -1255,13 +1255,14 @@ class apache2_plugin {
//* check if we have already a Let's Encrypt cert //* check if we have already a Let's Encrypt cert
//if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
// we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert
$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); if(!empty($lddomain)) {
$app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG); $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
$app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG);
}
$success = false; $success = false;
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt'));
$letsencrypt = reset($letsencrypt); $letsencrypt = reset($letsencrypt);
if(is_executable($letsencrypt)) { if(is_executable($letsencrypt) && !empty($lddomain)) {
$success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
} }
if(!$success) { if(!$success) {
......
...@@ -1329,13 +1329,15 @@ class nginx_plugin { ...@@ -1329,13 +1329,15 @@ class nginx_plugin {
//* check if we have already a Let's Encrypt cert //* check if we have already a Let's Encrypt cert
//if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
// we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert
$app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); if(!empty($lddomain)) {
$app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG); $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG);
$app->log("Let's Encrypt SSL Cert domains: $lddomain", LOGLEVEL_DEBUG);
}
$success = false; $success = false;
$letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt'));
$letsencrypt = reset($letsencrypt); $letsencrypt = reset($letsencrypt);
if(is_executable($letsencrypt)) { if(is_executable($letsencrypt) && !empty($lddomain)) {
$success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain $lddomain --webroot-path /usr/local/ispconfig/interface/acme");
} }
if(!$success) { if(!$success) {
......
Markdown is supported
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