mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Delete route only if exist
This commit is contained in:
parent
9b32a6aab5
commit
728253d324
1 changed files with 1 additions and 1 deletions
|
@ -359,7 +359,7 @@ while true; do
|
|||
_dns "$OMR_TRACKER_HOST" "$OMR_TRACKER_DEVICE_IP" "yes"
|
||||
statusb=$?
|
||||
fi
|
||||
ip route del "$OMR_TRACKER_HOST" via "$OMR_TRACKER_DEVICE_GATEWAY" dev "$OMR_TRACKER_DEVICE" src "$OMR_TRACKER_DEVICE_IP" > /dev/null 2>&1
|
||||
[ -n "$(ip route show ${OMR_TRACKER_HOST} via ${OMR_TRACKER_DEVICE_GATEWAY} dev ${OMR_TRACKER_DEVICE} src ${OMR_TRACKER_DEVICE_IP})" ] && ip route del "$OMR_TRACKER_HOST" via "$OMR_TRACKER_DEVICE_GATEWAY" dev "$OMR_TRACKER_DEVICE" src "$OMR_TRACKER_DEVICE_IP" > /dev/null 2>&1
|
||||
if $(exit $statusb); then
|
||||
OMR_TRACKER_STATUS_MSG=""
|
||||
OMR_TRACKER_STATUS="OK"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue