From 9884fd0575fd32167c6d4b9526a6260896e48d20 Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Sun, 31 Jul 2011 20:17:03 +0200 Subject: Add custom options section under Advanced. So users can add their own unbound specific options (http://forum.pfsense.org/index.php/topic,38954.0.html) --- config/unbound/unbound.inc | 9 +++++++++ config/unbound/unbound_advanced.xml | 8 ++++++++ 2 files changed, 17 insertions(+) (limited to 'config/unbound') diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc index ebe8fbdf..8d33e456 100644 --- a/config/unbound/unbound.inc +++ b/config/unbound/unbound.inc @@ -477,6 +477,15 @@ control-cert-file: "/usr/local/etc/unbound/unbound_control.pem" EOD; + # Handle custom options + if(!empty($unbound_config['custom_options'])) { + $custom_options = explode(";", ($unbound_config['custom_options'])); + $unbound_conf .= "# Unbound Custom options\n"; + foreach ($custom_options as $ent) { + $unbound_conf .= $ent."\n"; + } + } + file_put_contents("/usr/local/etc/unbound/unbound.conf", $unbound_conf); } diff --git a/config/unbound/unbound_advanced.xml b/config/unbound/unbound_advanced.xml index b24b18ba..03ba8157 100644 --- a/config/unbound/unbound_advanced.xml +++ b/config/unbound/unbound_advanced.xml @@ -302,6 +302,14 @@ + + Custom Options + custom_options + You can put your own custom options here, separated by semi-colons (;). These configurations options will then be added to the configuration file. <br/> <b>Note:</b> They need to be Unbound native configuration options, otherwise Unbound will <b>not</b> work. + textarea + 65 + 5 + -- cgit v1.2.3