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

Merge branch 'develop' into master

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-11-05 12:22:04 +01:00
commit 3d6a538077
28 changed files with 1099 additions and 850 deletions

View file

@ -276,6 +276,7 @@ dns_flush() {
# Get the current multipath status
multipath_status="off"
[ "$OMR_TRACKER_INTERFACE" = "omrvpn" ] && multipath $OMR_TRACKER_DEVICE off 2>&1 >/dev/null
if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
case "$(multipath "$OMR_TRACKER_DEVICE")" in
*default*) multipath_status="on" ;;
@ -847,6 +848,11 @@ if [ -n "$(logread | tail -n 2 | grep 'Ring expansion failed')" ]; then
echo 1 > /sys/bus/pci/rescan
fi
if [ "$(iptables-save | grep omr-bypass)" = "" ]; then
_log "Can't find omr-bypass rules, restart omr-bypass..."
/etc/init.d/omr-bypass
fi
if [ "$(pgrep openmptcprouter-vps)" = "" ] && ([ "$(uci -q show openmptcprouter | grep get_config=\'1\')" != "" ] || [ "$(uci -q show openmptcprouter | grep admin_error=\'1\')" != "" ]); then
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
sleep 5