mirror of
https://github.com/opnsense/plugins.git
synced 2026-06-09 00:42:34 -04:00
Merge pull request #134 from fraenki/issue_132
security/acme-client: fix $backend is not declared
This commit is contained in:
commit
d80b7007ed
2 changed files with 7 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= acme-client
|
||||
PLUGIN_VERSION= 1.6
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_COMMENT= Let's Encrypt client
|
||||
PLUGIN_MAINTAINER= opnsense@moov.de
|
||||
|
||||
|
|
|
|||
|
|
@ -421,6 +421,9 @@ function run_acme_validation($certObj, $valObj, $acctObj)
|
|||
{
|
||||
global $options;
|
||||
|
||||
// Required to run pre-defined commands.
|
||||
$backend = new Backend();
|
||||
|
||||
// Collect account information
|
||||
$account_conf_dir = "/var/etc/acme-client/accounts/" . $acctObj->id;
|
||||
$account_conf_file = $account_conf_dir . "/account.conf";
|
||||
|
|
@ -961,6 +964,9 @@ function run_restart_actions($certlist, $modelObj)
|
|||
$return = 0;
|
||||
$configObj = Config::getInstance()->object();
|
||||
|
||||
// Required to run pre-defined commands.
|
||||
$backend = new Backend();
|
||||
|
||||
// NOTE: Do NOT run any restart action twice, collect duplicates first.
|
||||
$restart_actions = array();
|
||||
|
||||
|
|
@ -1001,8 +1007,6 @@ function run_restart_actions($certlist, $modelObj)
|
|||
|
||||
// Run the collected restart actions.
|
||||
if (!empty($restart_actions) and is_array($restart_actions)) {
|
||||
// Required to run pre-defined commands.
|
||||
$backend = new Backend();
|
||||
// Extract cert object
|
||||
foreach ($restart_actions as $action) {
|
||||
// Run pre-defined or custom command?
|
||||
|
|
|
|||
Loading…
Reference in a new issue