File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 597597 }
598598}
599599
600+ // update acme.sh if installed
601+ $ inst ->update_acme ();
602+
600603if ($ conf ['services ' ]['web ' ] == true ) {
601604 //** Configure apps vhost
602605 swriteln ('Configuring Apps vhost ' );
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+ public 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 && is_executable ($ 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 ;
@@ -2939,6 +2954,9 @@ public function make_ispconfig_ssl_cert() {
29392954 $ acme = reset ($ acme );
29402955 if ($ acme && is_executable ($ acme )) {
29412956 swriteln ('Installed acme.sh and using it for certificate creation during install. ' );
2957+
2958+ // we do this even on install to enable automatic updates
2959+ $ this ->update_acme ();
29422960 } else {
29432961 swriteln ('Failed installing acme.sh. Will not be able to issue certificate during install. ' );
29442962 }
Original file line number Diff line number Diff line change 566566 }
567567}
568568
569+ // update acme.sh if installed
570+ $ inst ->update_acme ();
571+
569572$ inst ->install_ispconfig ();
570573
571574// Cleanup
You can’t perform that action at this time.
0 commit comments