mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix pihole support
This commit is contained in:
parent
a85cc0ea6e
commit
7342d821a3
1 changed files with 24 additions and 8 deletions
|
@ -197,8 +197,12 @@ _get_vps_config() {
|
|||
fi
|
||||
fi
|
||||
if [ "$pihole" = "true" ]; then
|
||||
uci -q set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
uci -q set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
EOF
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ "$vpn" = "glorytun_udp" ]; then
|
||||
|
@ -235,22 +239,34 @@ _get_vps_config() {
|
|||
fi
|
||||
fi
|
||||
if [ "$pihole" = "true" ]; then
|
||||
uci -q set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
uci -q set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
EOF
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ "$vpn" = "openvpn" ]; then
|
||||
if [ "$pihole" = "true" ]; then
|
||||
host_ip="$(echo "$vps_config" | jsonfilter -q -e '@.openvpn.host_ip')"
|
||||
uci -q set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
uci -q set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
EOF
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ "$vpn" = "mlvpn" ]; then
|
||||
if [ "$pihole" = "true" ]; then
|
||||
host_ip="$(echo "$vps_config" | jsonfilter -q -e '@.mlvpn.host_ip')"
|
||||
uci -q set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
uci -q set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set dhcp.@dnsmasq[0].server="$host_ip#53"
|
||||
set dhcp.@dnsmasq[0].rebind_protection='0'
|
||||
commit dhcp
|
||||
EOF
|
||||
/etc/init.d/dnsmasq restart >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
if [ "$glorytun_change" != "0" ]; then
|
||||
|
|
Loading…
Reference in a new issue