1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Really pi-hole

This commit is contained in:
Ycarus 2019-05-12 09:48:21 +02:00
parent 814a64a4ba
commit 1fced47334

View file

@ -198,7 +198,8 @@ _get_vps_config() {
fi
if [ "$pihole" = "true" ]; then
uci -q batch <<-EOF >/dev/null
set dhcp.@dnsmasq[0].server="$host_ip#53"
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
set dhcp.@dnsmasq[0].rebind_protection='0'
commit dhcp
EOF
@ -240,7 +241,8 @@ _get_vps_config() {
fi
if [ "$pihole" = "true" ]; then
uci -q batch <<-EOF >/dev/null
set dhcp.@dnsmasq[0].server="$host_ip#53"
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
set dhcp.@dnsmasq[0].rebind_protection='0'
commit dhcp
EOF
@ -251,7 +253,8 @@ _get_vps_config() {
if [ "$pihole" = "true" ]; then
host_ip="$(echo "$vps_config" | jsonfilter -q -e '@.openvpn.host_ip')"
uci -q batch <<-EOF >/dev/null
set dhcp.@dnsmasq[0].server="$host_ip#53"
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
set dhcp.@dnsmasq[0].rebind_protection='0'
commit dhcp
EOF
@ -262,7 +265,8 @@ _get_vps_config() {
if [ "$pihole" = "true" ]; then
host_ip="$(echo "$vps_config" | jsonfilter -q -e '@.mlvpn.host_ip')"
uci -q batch <<-EOF >/dev/null
set dhcp.@dnsmasq[0].server="$host_ip#53"
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server="$host_ip#53"
set dhcp.@dnsmasq[0].rebind_protection='0'
commit dhcp
EOF