DE_ICE: Add support for WIFI@DB SSID

This commit is contained in:
embr 2022-10-04 13:30:11 +02:00
parent a7766bdd7e
commit f81be85d50
2 changed files with 8 additions and 1 deletions

View file

@ -1,4 +1,8 @@
ambient_is_ssid "WIFIonICE"; or exit
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
curl -s https://iceportal.de/api1/rs/status | jq -r '"
AMBIENT_DE_ICE_CONNECTION=\(.connection)

View file

@ -0,0 +1,3 @@
function ambient_resolve4
host -tA iceportal.de | sed 's/.*has address //'
end