aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/unbound/unbound.inc23
1 files changed, 14 insertions, 9 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 8d33e456..7102b76c 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -463,6 +463,19 @@ access-control: 127.0.0.0/8 allow
# Domain overrides
{$domain_overrides}
+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";
+ }
+}
+
+ $unbound_conf .= <<<EOD
+
###
# Remote Control Config
###
@@ -477,15 +490,7 @@ 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);
}