File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,13 @@ class cronjob_letsencrypt extends cronjob {
3636 public function onRunJob () {
3737 global $ app , $ conf ;
3838
39- $ letsencrypt = array_shift ( explode ("\n" , ` which letsencrypt /root/.local/share/letsencrypt/bin/letsencrypt ` ) );
39+ $ letsencrypt = array_shift ( explode ("\n" , $ this -> _exec ( ' which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt ' ) ) );
4040 if (is_executable ($ letsencrypt )) {
4141 $ version = trim (exec ($ letsencrypt . ' --version 2>/dev/null ' ));
4242 if (preg_match ('/^(\S+)\s+(\d+(\.\d+)+)$/ ' , $ version , $ matches )) {
4343 $ type = strtolower ($ matches [1 ]);
4444 $ version = $ matches [2 ];
45- if ($ type != 'letsencrypt ' || version_compare ($ version , '0.7.0 ' , '< ' )) {
45+ if (( $ type != 'letsencrypt ' && $ type != ' certbot ' ) || version_compare ($ version , '0.7.0 ' , '< ' )) {
4646 exec ($ letsencrypt . ' -n renew ' );
4747 $ app ->services ->restartServiceDelayed ('httpd ' , 'reload ' );
4848 } else {
Original file line number Diff line number Diff line change @@ -1234,7 +1234,7 @@ function update($event_name, $data) {
12341234 $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
12351235
12361236 $ success = false ;
1237- $ letsencrypt = array_shift ( explode ("\n" , ` which letsencrypt /root/.local/share/letsencrypt/bin/letsencrypt ` ) );
1237+ $ letsencrypt = array_shift ( explode ("\n" , shell_exec ( ' which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt ' ) ) );
12381238 if (is_executable ($ letsencrypt )) {
12391239 $ success = $ this ->_exec ($ letsencrypt . " auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@ $ domain --domains $ lddomain --webroot-path /usr/local/ispconfig/interface/acme " );
12401240 }
Original file line number Diff line number Diff line change @@ -1313,9 +1313,9 @@ function update($event_name, $data) {
13131313 $ app ->log ("Create Let's Encrypt SSL Cert for: $ domain " , LOGLEVEL_DEBUG );
13141314
13151315 $ success = false ;
1316- $ letsencrypt = array_shift ( explode ("\n" , ` which letsencrypt /root/.local/share/letsencrypt/bin/letsencrypt ` ) );
1316+ $ letsencrypt = array_shift ( explode ("\n" , shell_exec ( ' which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt ' ) ) );
13171317 if (is_executable ($ letsencrypt )) {
1318- $ success = $ this ->_exec ($ letsencrypt . " auth --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@ $ domain --domains $ lddomain --webroot-path /usr/local/ispconfig/interface/acme " );
1318+ $ success = $ this ->_exec ($ letsencrypt . " certonly --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@ $ domain --domains $ lddomain --webroot-path /usr/local/ispconfig/interface/acme " );
13191319 }
13201320 if (!$ success ) {
13211321 // error issuing cert
You can’t perform that action at this time.
0 commit comments