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:
parent
0f3ccf58d0
commit
453d349ff3
4 changed files with 5 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
MODEM_IP=`echo $1 | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)'`
|
||||
[ -z "$MODEM_IP" ] && return
|
||||
SESTOK=$(curl -s -m 1 -X GET "http://$MODEM_IP/api/webserver/SesTokInfo")
|
||||
[ -z "$SESTOK" ] && return
|
||||
COOKIE=$(echo $SESTOK | sed -ne '/SesInfo/{s/.*<SesInfo>\(.*\)<\/SesInfo>.*/\1/p;q;}')
|
||||
COOKIE=$(echo $COOKIE | sed 's:SessionID=::')
|
||||
TOKEN=$(echo $SESTOK | sed -ne '/TokInfo/{s/.*<TokInfo>\(.*\)<\/TokInfo>.*/\1/p;q;}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue