mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Fix tracker on down interface
This commit is contained in:
parent
5074d855f0
commit
f10191f25b
1 changed files with 1 additions and 1 deletions
|
@ -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 UP)" ]; then
|
||||
if [ -n "$(ip link show $OMR_TRACKER_DEVICE | grep 'state UP')" ]; 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}')
|
||||
|
|
Loading…
Reference in a new issue