Update ICE check by trying to parse JSON

This commit is contained in:
Tjark Saul 2020-09-28 21:32:36 +02:00
parent 98459f0168
commit 39b1fbd944

View file

@ -2,7 +2,7 @@ ambient_is_ssid "WIFI@DB" "WIFIonICE"; or exit
set train_status (curl -s https://iceportal.de/api1/rs/status)
echo $train_status | grep -i wagonClass; or exit
echo $train_status | jq type >/dev/null 2>&1; or exit
echo $train_status | jq -r '"
AMBIENT_DE_ICE_CONNECTION=\(.connection)