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'
|
||||
commit dhcp
|
||||
EOF
|
||||
/etc/init.d/dnsmasq restart
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue