summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorEric Luehrsen <ericluehrsen@hotmail.com>2017-02-11 16:57:15 -0500
committerEric Luehrsen <ericluehrsen@hotmail.com>2017-02-25 15:44:36 -0500
commite882e0d730b2ecd0bb30da096480e4b704717a48 (patch)
treebbb881c15fdf1bf89fc13199cf012d3d591a651f /applications
parentd29e39526228d8d545c0bf93d4b7cbc3a15018d2 (diff)
unbound: add uci-default script
Also if unbound-control is installed, then configure so luci-app-commands can quickly show the "local zones" and "local data" (aka hosts). This helps diagnose DHCP-DNS zone data and adblock zone data. Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound25
1 files changed, 25 insertions, 0 deletions
diff --git a/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound b/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound
new file mode 100644
index 000000000..cc714ac53
--- /dev/null
+++ b/applications/luci-app-unbound/root/etc/uci-defaults/60_luci-unbound
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@unbound[-1]
+ add ucitrack unbound
+ set ucitrack.@unbound[-1].init=unbound
+ commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcache
+[ ! -x /usr/sbin/unbound-control ] && exit 0
+
+uci -q batch <<-EOF >/dev/null
+ set luci.unboundhosts=command
+ set luci.unboundhosts.name='Unbound Local Hosts'
+ set luci.unboundhosts.command='unbound-control -c /var/lib/unbound/unbound.conf list_local_data'
+ set luci.unboundzones=command
+ set luci.unboundzones.name='Unbound Local Zones'
+ set luci.unboundzones.command='unbound-control -c /var/lib/unbound/unbound.conf list_local_zones'
+ commit luci
+EOF
+
+rm -f /tmp/luci-indexcache
+exit 0
+