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

Set timeout to get signal

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-02-22 14:12:13 +01:00
parent 0f3ccf58d0
commit 453d349ff3
4 changed files with 5 additions and 4 deletions

View file

@ -1,7 +1,7 @@
#!/bin/sh
MODEM_INTF=$1
[ -z "$MODEM_INTF" ] && return
SIGNAL_INFO=$(uqmi -d $MODEM_INTF --get-signal-info)
SIGNAL_INFO=$(timeout 1 uqmi -d $MODEM_INTF --get-signal-info)
[ -z "$SIGNAL_INFO" ] && return
TYPE=$(echo $SIGNAL_INFO | jsonfilter -e '@.type')
if [ "$TYPE" = "gsm" ]; then