summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2017-02-12 10:41:17 +0200
committerGitHub <noreply@github.com>2017-02-12 10:41:17 +0200
commite28660c26a96ef3d48f995228600c796f133eb58 (patch)
tree849a997ac6f575c7b368fdaf158a9038aa71402a /applications
parent0bfe064cc3f6c17cae6035d4a87066cdb6464078 (diff)
parent2dc66acf2d96b5c9e5b312ef3bfa2c2f23ed1e89 (diff)
Merge pull request #1002 from EricLuehrsen/unbound_uci_defaults
unbound: add uci-default script
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 0000000000..cc714ac53e
--- /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
+