mirror of
https://github.com/liclac/ambient
synced 2025-02-16 12:28:24 +00:00
Make sure that ICE data is only parsed if the response is JSON
This commit is contained in:
parent
371a703e8c
commit
98459f0168
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,10 @@
|
|||
ambient_is_ssid "WIFI@DB" "WIFIonICE"; or exit
|
||||
|
||||
curl -s https://iceportal.de/api1/rs/status | jq -r '"
|
||||
set train_status (curl -s https://iceportal.de/api1/rs/status)
|
||||
|
||||
echo $train_status | grep -i wagonClass; or exit
|
||||
|
||||
echo $train_status | jq -r '"
|
||||
AMBIENT_DE_ICE_CONNECTION=\(.connection)
|
||||
AMBIENT_DE_ICE_SERVICE_LEVEL=\(.servicelevel)
|
||||
AMBIENT_DE_ICE_INTERNET=\(.internet)
|
||||
|
|
Loading…
Add table
Reference in a new issue