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

Check if multipath is enabled before doing something with it

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-08-20 20:12:59 +02:00
parent 6b789fd728
commit b78f2340b2
3 changed files with 11 additions and 8 deletions

View file

@ -186,9 +186,10 @@ multipath_fix() {
/etc/init.d/mptcp reload $interface >/dev/null 2>&1
}
}
config_load network
config_foreach multipath_fix interface
if [ "$(uci -q get network.globals.multipath)" = "enable" ]; then
config_load network
config_foreach multipath_fix interface
fi
if [ -f /etc/init.d/shadowsocks-libev ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.key)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "" ] && [ "$(uci -q get shadowsocks-libev.sss0.server)" != "192.168.1.3" ] && [ "$(pgrep -f omr-tracker-ss)" = "" ] && [ "$(pgrep -f '/etc/init.d/omr-tracker')" = "" ]; then
_log "Can't find omr-tracker-ss for Shadowsocks libev, restart omr-tracker..."
/etc/init.d/omr-tracker restart >/dev/null 2>&1