mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use tracking to get server info when available
This commit is contained in:
parent
d380a6a6eb
commit
843a4d968f
2 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||||
|
# Released under GPL 3. See LICENSE for the full terms.
|
||||||
|
|
||||||
START=90
|
START=90
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,12 @@ fi
|
||||||
if [ -n "$masterintf" ] && [ "$(uci -q get openmptcprouter.$masterintf.latency)" != "" ] && [ "$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')" -gt "$(($OMR_TRACKER_LATENCY*2))" ]; then
|
if [ -n "$masterintf" ] && [ "$(uci -q get openmptcprouter.$masterintf.latency)" != "" ] && [ "$(uci -q get openmptcprouter.$masterintf.latency | tr -d '\n')" -gt "$(($OMR_TRACKER_LATENCY*2))" ]; then
|
||||||
uci -q set network.$masterintf.multipath='on'
|
uci -q set network.$masterintf.multipath='on'
|
||||||
uci -q set network.$OMR_TRACKER_INTERFACE.multipath='master'
|
uci -q set network.$OMR_TRACKER_INTERFACE.multipath='master'
|
||||||
|
_log "Change master interface from $masterintf to $OMR_TRACKER_INTERFACE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ "$(uci -q get openmptcprouter.vps.get_config)" = "1" ]; then
|
||||||
|
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
||||||
|
sleep 5
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue