feat(networking): auto-login for Deutsche Bahn WiFi portals
Some checks failed
Test / tests (push) Failing after 25m51s
Some checks failed
Test / tests (push) Failing after 25m51s
This commit is contained in:
parent
576ddc0d69
commit
b5341635d9
1 changed files with 16 additions and 0 deletions
|
@ -119,4 +119,20 @@ in
|
||||||
dig
|
dig
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.networkmanager.dispatcherScripts = [
|
||||||
|
{
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source = pkgs.writeText "connect_ice" ''
|
||||||
|
set -euxo pipefail
|
||||||
|
ACTION="$2"
|
||||||
|
if [[ "$ACTION" == "up" ]]; then
|
||||||
|
if [[ "$CONNECTION_ID" =~ "WIFIonICE|WIFI@DB" ]]; then
|
||||||
|
${pkgs.curl}/bin/curl 'https://login.wifionice.de/cna/logon' -sSL -X POST
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
type = "basic";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue