1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2023-10-06 16:51:34 +02:00
parent e56c73bf7d
commit 7aec8f9470

View file

@ -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}')