mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Rescan instead of restart ModemManager when modem missing, restart OpenPVN if not working
This commit is contained in:
parent
f1d429e0ee
commit
95cdac78e2
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue