File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -1255,13 +1255,14 @@ function update($event_name, $data) {
12551255 //* check if we have already a Let's Encrypt cert
12561256 //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
12571257 // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert
1258- $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
1259- $ app ->log ("Let's Encrypt SSL Cert domains: $ lddomain " , LOGLEVEL_DEBUG );
1260-
1258+ if (!empty ($ lddomain )) {
1259+ $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
1260+ $ app ->log ("Let's Encrypt SSL Cert domains: $ lddomain " , LOGLEVEL_DEBUG );
1261+ }
12611262 $ success = false ;
12621263 $ letsencrypt = explode ("\n" , shell_exec ('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt ' ));
12631264 $ letsencrypt = reset ($ letsencrypt );
1264- if (is_executable ($ letsencrypt )) {
1265+ if (is_executable ($ letsencrypt ) && ! empty ( $ lddomain ) ) {
12651266 $ 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 " );
12661267 }
12671268 if (!$ success ) {
Original file line number Diff line number Diff line change @@ -1329,13 +1329,15 @@ function update($event_name, $data) {
13291329 //* check if we have already a Let's Encrypt cert
13301330 //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) {
13311331 // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert
1332- $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
1333- $ app ->log ("Let's Encrypt SSL Cert domains: $ lddomain " , LOGLEVEL_DEBUG );
1332+ if (!empty ($ lddomain )) {
1333+ $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
1334+ $ app ->log ("Let's Encrypt SSL Cert domains: $ lddomain " , LOGLEVEL_DEBUG );
1335+ }
13341336
13351337 $ success = false ;
13361338 $ letsencrypt = explode ("\n" , shell_exec ('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt ' ));
13371339 $ letsencrypt = reset ($ letsencrypt );
1338- if (is_executable ($ letsencrypt )) {
1340+ if (is_executable ($ letsencrypt ) && && ! empty ( $ lddomain ) ) {
13391341 $ 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 " );
13401342 }
13411343 if (!$ success ) {
You can’t perform that action at this time.
0 commit comments