Skip to content

Commit

Permalink
Fix VPN route in omr-tracker post-tracking 002-error script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 3, 2025
1 parent 09e91b2 commit f270889
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions omr-tracker/files/usr/share/omr/lib/common-post-tracking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ set_server_route6() {
fi
}

del_default_route() {
ip route del default dev $OMR_TRACKER_DEVICE >/dev/null 2>&1
}

del_server_route() {
local server=$1
remove_route() {
Expand Down
1 change: 1 addition & 0 deletions omr-tracker/files/usr/share/omr/post-tracking.d/002-error
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || { [ "$OMR_TRACKER_INTERFACE" != "omrvp
uci -q set openmptcprouter.omr.vpn='down'
fi
if [ "$(uci -q get openmptcprouter.settings.defaultgw)" != "0" ]; then
del_default_route
config_load network
config_foreach set_route interface $OMR_TRACKER_INTERFACE
config_foreach set_route6 interface $OMR_TRACKER_INTERFACE
Expand Down

0 comments on commit f270889

Please sign in to comment.