mirror of
https://github.com/liclac/ambient
synced 2024-11-25 05:00:22 +00:00
DE_ICE: welp, found an ICE with a public iceportal.de IP
This commit is contained in:
parent
809e5ed823
commit
0e25f9eb2a
1 changed files with 1 additions and 4 deletions
|
@ -1,10 +1,7 @@
|
|||
ambient_is_ssid "WIFIonICE" "WIFI@DB"; or exit
|
||||
|
||||
# Some ICEs use the SSID "WIFI@DB", but that's also used at stations in Germany.
|
||||
# We can tell if we're on a train if iceportal.de resolves to a private IP addr.
|
||||
string match '172.*' (ambient_resolve4 iceportal.de) >/dev/null; or exit
|
||||
|
||||
# Also double-check that the API returns valid JSON, also not the case at stations.
|
||||
# Check that we can actually reach the status API and get valid JSON back.
|
||||
set train_status (curl -s https://iceportal.de/api1/rs/status)
|
||||
echo $train_status | jq type >/dev/null 2>&1; or exit
|
||||
|
||||
|
|
Loading…
Reference in a new issue