aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-07-31 20:17:03 +0200
committerWarren Baker <warren@decoy.co.za>2011-07-31 20:17:03 +0200
commit9884fd0575fd32167c6d4b9526a6260896e48d20 (patch)
tree0fa48eea2155986c078c77db7114071ba16138e7 /config
parent5ca815cd940346e8350b16e2ad19f67b4278fca2 (diff)
downloadpfsense-packages-9884fd0575fd32167c6d4b9526a6260896e48d20.tar.gz
pfsense-packages-9884fd0575fd32167c6d4b9526a6260896e48d20.tar.bz2
pfsense-packages-9884fd0575fd32167c6d4b9526a6260896e48d20.zip
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)
Diffstat (limited to 'config')
-rw-r--r--config/unbound/unbound.inc9
-rw-r--r--config/unbound/unbound_advanced.xml8
2 files changed, 17 insertions, 0 deletions
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 @@
</options>
<advancedfield/>
</field>
+ <field>
+ <fielddescr>Custom Options</fielddescr>
+ <fieldname>custom_options</fieldname>
+ <description>You can put your own custom options here, separated by semi-colons (;). These configurations options will then be added to the configuration file. &lt;br/&gt; &lt;b&gt;Note:&lt;/b&gt; They need to be Unbound native configuration options, otherwise Unbound will &lt;b&gt;not&lt;/b&gt; work.</description>
+ <type>textarea</type>
+ <cols>65</cols>
+ <rows>5</rows>
+ </field>
</fields>
<custom_add_php_command>
</custom_add_php_command>