1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix and more info on omr-tracker

This commit is contained in:
Ycarus 2018-08-14 16:24:29 +02:00
parent cebb8eb9d7
commit 0c41334fc0
2 changed files with 60 additions and 39 deletions

View file

@ -115,7 +115,11 @@ default_gw=$(ip route show default | grep -v metric | awk '/default/ {print $3}'
if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
[ "$multipath_status" = "off" ] || {
_log "$OMR_TRACKER_DEVICE switched off because $OMR_TRACKER_STATUS_MSG"
if [ "$OMR_TRACKER_STATUS_MSG" = "" ]; then
_log "$OMR_TRACKER_DEVICE switched off"
else
_log "$OMR_TRACKER_DEVICE switched off because $OMR_TRACKER_STATUS_MSG"
fi
if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then
multipath "$OMR_TRACKER_DEVICE" off
fi
@ -136,7 +140,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
config_foreach set_route interface $OMR_TRACKER_INTERFACE
fi
if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "omrvpn" ]; then
_log "$OMR_TRACKER_INTERFACE down because $OMR_TRACKER_STATUS_MSG"
if [ "$OMR_TRACKER_STATUS_MSG" = "" ]; then
_log "$OMR_TRACKER_INTERFACE down"
else
_log "$OMR_TRACKER_INTERFACE down because $OMR_TRACKER_STATUS_MSG"
fi
config_load network
config_foreach set_route interface $OMR_TRACKER_INTERFACE
#config_load shadowsocks-libev