diff --git a/security/acme-client/Makefile b/security/acme-client/Makefile index 86b992e8d..790c3b15a 100644 --- a/security/acme-client/Makefile +++ b/security/acme-client/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= acme-client -PLUGIN_VERSION= 2.4 +PLUGIN_VERSION= 2.5 PLUGIN_COMMENT= Let's Encrypt client PLUGIN_MAINTAINER= opnsense@moov.de PLUGIN_DEPENDS= acme.sh py${PLUGIN_PYTHON}-dns-lexicon diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index f830046bf..0be03d664 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -8,6 +8,14 @@ WWW: https://github.com/acmesh-official/acme.sh Plugin Changelog ================ +2.5 + +Fixed: +* ensure that the auto renewal cron job is properly disabled (#2178) + +Changed: +* reload settings page to show/hide cron tab + 2.4 Added: diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php index 3dcd37d54..3dee7cfb2 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/Api/SettingsController.php @@ -86,6 +86,8 @@ class SettingsController extends ApiMutableModelControllerBase Config::getInstance()->save(); // Refresh the crontab $backend->configdRun('template reload OPNsense/Cron'); + // (res)start daemon + $backend->configdRun("cron restart"); $result['result'] = "new"; $result['uuid'] = $cron_uuid; } else { @@ -99,7 +101,7 @@ class SettingsController extends ApiMutableModelControllerBase ) { // Get UUID, clean existin entry $cron_uuid = (string)$mdlAcme->settings->UpdateCron; - $mdlAcme->settings->UpdateCron = null; + $mdlAcme->settings->UpdateCron = ""; $mdlCron = new Cron(); // Delete the cronjob item if ($mdlCron->jobs->job->del($cron_uuid)) { @@ -109,6 +111,8 @@ class SettingsController extends ApiMutableModelControllerBase Config::getInstance()->save(); // Regenerate the crontab $backend->configdRun('template reload OPNsense/Cron'); + // (res)start daemon + $backend->configdRun("cron restart"); $result['result'] = "deleted"; } else { $result['result'] = "unable to delete cron"; diff --git a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogCertificate.xml b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogCertificate.xml index e387fc786..ee0eb8daf 100644 --- a/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogCertificate.xml +++ b/security/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogCertificate.xml @@ -101,7 +101,7 @@ certificate.domainalias text - acme.sh documentation for further information.]]> + acme.sh documentation for further information.]]> @@ -112,6 +112,6 @@ certificate.challengealias text - acme.sh documentation for further information.]]> + acme.sh documentation for further information.]]> diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/Base.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/Base.php index a541584ac..a69443228 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/Base.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/Base.php @@ -232,7 +232,7 @@ abstract class Base extends \OPNsense\AcmeClient\LeCommon $this->acme_args[] = LeUtils::execSafe('--domain %s', $certname); // Main domain: Use DNS alias mode for domain validation? - // https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode + // https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode if ($this->getMethod() == 'dns01') { switch ((string)$aliasmode) { case 'automatic': @@ -256,7 +256,7 @@ abstract class Base extends \OPNsense\AcmeClient\LeCommon $this->acme_args[] = LeUtils::execSafe('--domain %s', $altname); // altNames: Use DNS alias mode for domain validation? - // https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode + // https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode if ($this->getMethod() == 'dns01') { switch ((string)$this->cert_aliasmode) { case 'automatic': diff --git a/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/settings.volt b/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/settings.volt index bb67c87c0..2d1b034e7 100644 --- a/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/settings.volt +++ b/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/settings.volt @@ -54,8 +54,6 @@ POSSIBILITY OF SUCH DAMAGE. // Save & reconfigure acme-client to activate changes $("#reconfigureAct").click(function(){ - // TODO: reload the page afterwards to show/hide the "Schedule" tab - // set progress animation $('[id*="reconfigureAct_progress"]').each(function(){ $(this).addClass("fa fa-spinner fa-pulse"); @@ -99,6 +97,10 @@ POSSIBILITY OF SUCH DAMAGE. // when done, disable progress animation $('[id*="reconfigureAct_progress"]').each(function(){ $(this).removeClass("fa fa-spinner fa-pulse"); + // reload page to show or hide links to cron edit page + setTimeout(function () { + window.location.reload(true) + }, 300); }); dlg.close(); } @@ -132,6 +134,10 @@ POSSIBILITY OF SUCH DAMAGE. // when done, disable progress animation $('[id*="reconfigureAct_progress"]').each(function(){ $(this).removeClass("fa fa-spinner fa-pulse"); + // reload page to show or hide links to cron edit page + setTimeout(function () { + window.location.reload(true) + }, 300); }); }); }); @@ -246,7 +252,7 @@ POSSIBILITY OF SUCH DAMAGE. {{ lang._('Please use the %sissue tracker%s to report bugs or request new features.') | format('', '') }}

-

{{ lang._('This plugin includes code from the %s project.') | format('Neilpang/acme.sh' ) }} {{ lang._('Licensed under GPLv3.') }}
{{ lang._('Let"s Encrypt(tm) is a trademark of the Internet Security Research Group. All rights reserved.') }}

+

{{ lang._('This plugin includes code from the %s project.') | format('acmesh-official/acme.sh' ) }} {{ lang._('Licensed under GPLv3.') }}
{{ lang._('Let"s Encrypt(tm) is a trademark of the Internet Security Research Group. All rights reserved.') }}