mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 19:11:51 +00:00
25 lines
643 B
Bash
Executable file
25 lines
643 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ "$(uci -q get unbound.@unbound[0].listen_port | grep 5353)" = "" ]; then
|
|
uci -q batch <<-EOF >/dev/null
|
|
set unbound.@unbound[-1].listen_port=5353
|
|
set unbound.@unbound[-1].protocol="ip4_only"
|
|
set unbound.@unbound[-1].enabled=1
|
|
set unbound.@unbound[-1].recursion="aggressive"
|
|
commit unbound
|
|
EOF
|
|
fi
|
|
if [ "$(uci -q show dhcp | grep 127.0.0.1#5353)" = "" ]; then
|
|
uci -q batch <<-EOF >/dev/null
|
|
add_list dhcp.@dnsmasq[-1].server="127.0.0.1#5353"
|
|
commit dhcp
|
|
EOF
|
|
fi
|
|
uci -q batch <<-EOF >/dev/null
|
|
set dhcp.@dnsmasq[-1].noresolv=1
|
|
del dhcp.@dnsmasq[-1].interface
|
|
commit dhcp
|
|
EOF
|
|
rm -f /tmp/luci-indexcache
|
|
|
|
exit 0
|