Skip to content

Commit

Permalink
Rescan instead of restart ModemManager when modem missing, restart Op…
Browse files Browse the repository at this point in the history
…enPVN if not working
  • Loading branch information
Ysurac committed Dec 25, 2023
1 parent f1d429e commit 95cdac7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,10 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
fi
done
if [ "$modemfind" = "0" ]; then
_log "Can't find $OMR_TRACKER_INTERFACE in ModemManager, restart modemmanager..."
/etc/init.d/modemmanager restart
_log "Can't find $OMR_TRACKER_INTERFACE in ModemManager, rescan modem..."
/usr/bin/mmcli -S 2>&1 >/dev/null
#_log "Can't find $OMR_TRACKER_INTERFACE in ModemManager, restart modemmanager..."
#/etc/init.d/modemmanager restart
sleep 30
fi
fi
Expand Down Expand Up @@ -901,6 +903,10 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
_log "Glorytun UDP VPN down, restart it"
/etc/init.d/glorytun-udp restart 2>&1 >/dev/null
fi
if [ "$(uci -q get openvpn.omr.enabled)" = "1" ]; then
_log "OpenVPN down, restart it"
/etc/init.d/openvpn restart 2>&1 >/dev/null
fi
config_load openmptcprouter
config_foreach disable_pihole server
#if [ "$(uci -q get openmptcprouter.settings.master)" != "balancing" ] || [ "$(uci -q get openmptcprouter.settings.vpn)" = "mlvpn" ]; then
Expand Down

0 comments on commit 95cdac7

Please sign in to comment.