aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound.inc
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/unbound/unbound.inc
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/unbound/unbound.inc')
-rw-r--r--config/unbound/unbound.inc9
1 files changed, 9 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);
}