mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/acme-client: fix $backend is not declared, closes #132
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user