Skip to content

Commit

Permalink
Fix OMR-Tracker for VPN
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 16, 2024
1 parent 5d0aac0 commit f350523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omr-tracker/files/bin/omr-tracker
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ while true; do
}

if [ -n "$OMR_TRACKER_DEVICE" ] && [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ]; then
if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ] || [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UNKNOWN')" ]; then
# retrieve iface ip and gateway
if ([ "$OMR_TRACKER_FAMILY" = "ipv4" ] || [ "$OMR_TRACKER_FAMILY" = "ipv4ipv6" ]) && [ "$OMR_TRACKER_INTERFACE_PROTO" != "dhcpv6" ]; then
OMR_TRACKER_DEVICE_IP=$(ip -4 -br addr ls dev "$OMR_TRACKER_DEVICE" | awk -F'[ /]+' '{print $3}')
Expand Down

0 comments on commit f350523

Please sign in to comment.