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:
parent
6f21253f0a
commit
df496aea2b
2 changed files with 46 additions and 3 deletions
22
openmptcprouter/files/etc/init.d/disablepihole
Executable file
22
openmptcprouter/files/etc/init.d/disablepihole
Executable 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue