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/views/OPNsense/AcmeClient/settings.volt b/security/acme-client/src/opnsense/mvc/app/views/OPNsense/AcmeClient/settings.volt index bb67c87c0..2800f4cbe 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); }); }); });