From 13a11fa34e1aa09cd89190ec0ec992dfa7af3aa8 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 9 Apr 2020 14:45:31 +0200 Subject: [PATCH] Unbound: missed some spots integrating Unbound plus, align normal service restart (status action and link to "enabled" flag for Unbound) --- .../Unbound/Api/ServiceController.php | 4 +- .../app/models/OPNsense/Unboundplus/Dnsbl.xml | 3 + .../views/OPNsense/Unbound/miscellaneous.volt | 2 +- src/opnsense/scripts/unbound/dnsbl.py | 197 ++++++++++++++++++ .../conf/actions.d/actions_unbound.conf | 6 + 5 files changed, 209 insertions(+), 3 deletions(-) create mode 100755 src/opnsense/scripts/unbound/dnsbl.py diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/ServiceController.php b/src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/ServiceController.php index 3dd3b4203..3cbb2eaaa 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/ServiceController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/ServiceController.php @@ -38,8 +38,8 @@ class ServiceController extends ApiMutableServiceControllerBase { protected static $internalServiceClass = '\OPNsense\Unboundplus\Dnsbl'; protected static $internalServiceTemplate = 'OPNsense/Unbound'; - protected static $internalServiceEnabled = 'enabled'; - protected static $internalServiceName = 'unboundplus'; + protected static $internalServiceEnabled = 'service_enabled'; + protected static $internalServiceName = 'unbound'; public function dnsblAction() { diff --git a/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Dnsbl.xml b/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Dnsbl.xml index 5b537c08f..8550f044f 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Dnsbl.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Unboundplus/Dnsbl.xml @@ -3,6 +3,9 @@ Unbound DNSBL configuration 0.0.1 + + unbound.enable + 0 Y diff --git a/src/opnsense/mvc/app/views/OPNsense/Unbound/miscellaneous.volt b/src/opnsense/mvc/app/views/OPNsense/Unbound/miscellaneous.volt index 7cdbd058d..fbc2d8ae2 100644 --- a/src/opnsense/mvc/app/views/OPNsense/Unbound/miscellaneous.volt +++ b/src/opnsense/mvc/app/views/OPNsense/Unbound/miscellaneous.volt @@ -49,7 +49,7 @@