File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,21 @@ private function install_acme() {
5151 return ($ val == 0 ? true : false );
5252 }
5353
54+ private function update_acme () {
55+ $ acme = explode ("\n" , shell_exec ('which /usr/local/ispconfig/server/scripts/acme.sh /root/.acme.sh/acme.sh ' ));
56+ $ acme = reset ($ acme );
57+ $ val = 0 ;
58+
59+ if ($ acme ) {
60+ $ cmd = $ acme . ' --upgrade --auto-upgrade ; ' . $ acme . ' --set-default-ca --server letsencrypt ' ;
61+ $ ret = null ;
62+ $ val = 0 ;
63+ exec ($ cmd . ' 2>&1 ' , $ ret , $ val );
64+ }
65+
66+ return ($ val == 0 ? true : false );
67+ }
68+
5469 //: TODO Implement the translation function and language files for the installer.
5570 public function lng ($ text ) {
5671 return $ text ;
@@ -2923,6 +2938,11 @@ public function make_ispconfig_ssl_cert() {
29232938 }
29242939 }
29252940
2941+ if ($ acme && is_executable ($ acme )) {
2942+ // we do this even on install to enable automatic updates
2943+ $ this ->update_acme ();
2944+ }
2945+
29262946 $ restore_conf_symlink = false ;
29272947
29282948 // we only need this for apache, so use fixed conf index
You can’t perform that action at this time.
0 commit comments