mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix error when VPN is set to none
This commit is contained in:
parent
e56c73bf7d
commit
7aec8f9470
1 changed files with 1 additions and 0 deletions
|
@ -927,6 +927,7 @@ _set_vpn_ip() {
|
|||
local settings
|
||||
[ -z "$vps_config" ] && vps_config=$(_get_json "config")
|
||||
[ -z "$vps_config" ] && return
|
||||
[ "$(uci -q get openmptcprouter.settings.vpn)" = "none" ] && return
|
||||
vpnifname="$(uci -q get network.omrvpn.device)"
|
||||
vpnip_local_current="$(echo "$vps_config" | jsonfilter -q -e '@.vpn.remoteip')"
|
||||
vpnip_local=$(ip -4 -br addr ls dev ${vpnifname} | awk -F'[ /]+' '{print $3}')
|
||||
|
|
Loading…
Reference in a new issue