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

Start or restart ModemManager when needed

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-04-22 19:58:49 +02:00
parent 13115def43
commit bf7ef80729
2 changed files with 10 additions and 0 deletions

View file

@ -181,6 +181,10 @@ start_service() {
EOF
/etc/init.d/rpcd restart 2>&1 >/dev/null
fi
if [ "$(pgrep ModemManager)" = "" ] && [ -f /etc/init.d/modemmanager ] && [ -n "$(uci -q show network | grep modemmanager)" ]; then
_log "Can't find ModemManager, start it..."
/etc/init.d/modemmanager restart
fi
}
stop_service() {