1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2019-08-23 20:59:11 +02:00
parent f7632138d3
commit e5e87854f3
3 changed files with 7 additions and 3 deletions

View file

@ -191,6 +191,7 @@ disable_pihole() {
set dhcp.@dnsmasq[0].server='127.0.0.1#5353'
commit dhcp
EOF
/etc/init.d/dnsmasq restart
fi
}

View file

@ -271,14 +271,17 @@ set_pihole() {
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
[ -z "$vps_config" ] && return
vpn="$(uci -q get openmptcprouter.settings.vpn)"
piholeomr="$(uci -q get openmptcprouter.${servername}.pihole)"
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
set openmptcprouter.${servername}.pihole='1'
commit openmptcprouter
EOF
else
elif [ "$piholeomr" != "0" ]; then
uci -q batch <<-EOF >/dev/null
set openmptcprouter.${servername}.pihole='0'
commit openmptcprouter
EOF
fi

View file

@ -3,6 +3,6 @@ uci -q batch <<-EOF >/dev/null
set uhttpd.main.redirect_https=0
set uhttpd.main.script_timeout=240
set uhttpd.main.network_timeout=240
set uhttpd.main.http_keepalive=60
set uhttpd.main.http_keepalive=120
EOF
exit 0