adguardhome: Implement initial package recipe

AdGuardHome is a network-wide ads and trackers blocking DNS server.
After installing it with opkg, start it like every service:
/etc/init.d/adguardhome start

In order to complete the installation vist http://{YOUR_ROUTERS_IP}:3000.

Then you can setup dnsmasq to forward DNS traffic to AdGuardHome:
uci -q delete dhcp.@dnsmasq[0].server
uci add_list dhcp.@dnsmasq[0].server=127.0.0.1#{PORT_SET_DURING_INSTALL}
uci set dhcp.@dnsmasq[0].noresolv=1
uci commit dhcp
/etc/init.d/dnsmasq restart

Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
This commit is contained in:
Dobroslaw Kijowski
2020-06-02 15:19:52 +02:00
parent 5d1127b7fe
commit 9d2d678db5
2 changed files with 83 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh /etc/rc.common
PROG=/usr/bin/AdGuardHome
USE_PROCD=1
# starts after network starts
START=21
# stops before networking stops
STOP=89
start_service() {
procd_open_instance
procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w /tmp/adguardhome --no-check-update
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}