mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Change DNS when VPS is down and Pi-Hole used
This commit is contained in:
parent
3193f4ef70
commit
00ddf7b378
2 changed files with 31 additions and 0 deletions
|
@ -175,6 +175,15 @@ _get_vps_config() {
|
|||
vpn="$(uci -q get openmptcprouter.settings.vpn)"
|
||||
|
||||
pihole="$(echo "$vps_config" | jsonfilter -q -e '@.pihole.state')"
|
||||
if [ "$pihole" = "true" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.${servername}.pihole='1'
|
||||
EOF
|
||||
else
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.${servername}.pihole='0'
|
||||
EOF
|
||||
fi
|
||||
|
||||
glorytun_state=0
|
||||
glorytun_change=0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue