mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Small changes
This commit is contained in:
parent
f7632138d3
commit
e5e87854f3
3 changed files with 7 additions and 3 deletions
|
@ -191,6 +191,7 @@ disable_pihole() {
|
||||||
set dhcp.@dnsmasq[0].server='127.0.0.1#5353'
|
set dhcp.@dnsmasq[0].server='127.0.0.1#5353'
|
||||||
commit dhcp
|
commit dhcp
|
||||||
EOF
|
EOF
|
||||||
|
/etc/init.d/dnsmasq restart
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,14 +271,17 @@ set_pihole() {
|
||||||
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
|
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
|
||||||
[ -z "$vps_config" ] && return
|
[ -z "$vps_config" ] && return
|
||||||
vpn="$(uci -q get openmptcprouter.settings.vpn)"
|
vpn="$(uci -q get openmptcprouter.settings.vpn)"
|
||||||
|
piholeomr="$(uci -q get openmptcprouter.${servername}.pihole)"
|
||||||
pihole="$(echo "$vps_config" | jsonfilter -q -e '@.pihole.state')"
|
pihole="$(echo "$vps_config" | jsonfilter -q -e '@.pihole.state')"
|
||||||
if [ "$pihole" = "true" ]; then
|
if [ "$pihole" = "true" ] && [ "$piholeomr" != "1" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set openmptcprouter.${servername}.pihole='1'
|
set openmptcprouter.${servername}.pihole='1'
|
||||||
|
commit openmptcprouter
|
||||||
EOF
|
EOF
|
||||||
else
|
elif [ "$piholeomr" != "0" ]; then
|
||||||
uci -q batch <<-EOF >/dev/null
|
uci -q batch <<-EOF >/dev/null
|
||||||
set openmptcprouter.${servername}.pihole='0'
|
set openmptcprouter.${servername}.pihole='0'
|
||||||
|
commit openmptcprouter
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@ uci -q batch <<-EOF >/dev/null
|
||||||
set uhttpd.main.redirect_https=0
|
set uhttpd.main.redirect_https=0
|
||||||
set uhttpd.main.script_timeout=240
|
set uhttpd.main.script_timeout=240
|
||||||
set uhttpd.main.network_timeout=240
|
set uhttpd.main.network_timeout=240
|
||||||
set uhttpd.main.http_keepalive=60
|
set uhttpd.main.http_keepalive=120
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue