1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Disable pihole at boot and set ip of shadowsocks and vpn from vps

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-09-17 19:51:52 +02:00
parent 6f21253f0a
commit df496aea2b
2 changed files with 46 additions and 3 deletions

View file

@ -0,0 +1,22 @@
#!/bin/sh /etc/rc.common
START=10
disable_pihole() {
local server=$1
if [ "$(uci -q get openmptcprouter.${server}.pihole)" = "1" ] && [ "$(uci -q get dhcp.@dnsmasq[0].server)" != "127.0.0.1#5353" ]; then
_log "Disable Pi-Hole for boot..."
uci -q batch <<-EOF >/dev/null
delete dhcp.@dnsmasq[0].server
add_list dhcp.@dnsmasq[0].server='127.0.0.1#5353'
commit dhcp
EOF
fi
}
start()
{
config_load openmptcprouter
config_foreach disable_pihole_status server
}