mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix vpnsips to server
This commit is contained in:
parent
1bdf85119e
commit
3b1b376f00
1 changed files with 1 additions and 1 deletions
|
@ -513,7 +513,7 @@ _set_vpn_ip() {
|
|||
vpnip_remote_current="$(echo "$vps_config" | jsonfilter -q -e '@.vpn.localip')"
|
||||
vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep via | grep -v default | grep -v / | grep -v metric | awk '{print $1}' | tr -d "\n")
|
||||
[ -z "$vpnip_remote" ] && vpnip_remote=$(ip -4 r list dev ${vpnifname} | grep kernel | awk '{print $1}' | tr -d "\n")
|
||||
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && [ "$vpnip_remote" != "$vpnip_remote_current" ] && [ "$vpnip_local" != "$vpnip_local_current" ]; then
|
||||
if [ "$vpnip_remote" != "" ] && [ "$vpnip_local" != "" ] && ([ "$vpnip_remote" != "$vpnip_remote_current" ] || [ "$vpnip_local" != "$vpnip_local_current" ]); then
|
||||
settings='{"remoteip" : "'$vpnip_local'","localip" : "'$vpnip_remote'"}'
|
||||
result=$(_set_json "vpnips" "$settings")
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue