mirror of
https://github.com/liclac/ambient
synced 2024-11-24 20:53:04 +00:00
DE_ICE: Add support for WIFI@DB SSID
This commit is contained in:
parent
a7766bdd7e
commit
f81be85d50
2 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
|
|
3
functions.d/ambient_resolve4.fish
Normal file
3
functions.d/ambient_resolve4.fish
Normal file
|
@ -0,0 +1,3 @@
|
|||
function ambient_resolve4
|
||||
host -tA iceportal.de | sed 's/.*has address //'
|
||||
end
|
Loading…
Reference in a new issue