feat: add autologin to ice_presence script
This commit is contained in:
parent
b7a8552f2b
commit
0d36a6920f
1 changed files with 7 additions and 0 deletions
|
|
@ -1,5 +1,12 @@
|
|||
# Check if device is in the ICE WiFi
|
||||
SSID=$(iwconfig wlp1s0 | grep ESSID | sed -e 's/.*ESSID:"\(.*\)"/\1/' | xargs)
|
||||
if [[ $SSID == "WIFIonICE" ]]; then
|
||||
# Authenticate for WiFi if needed; QoL Sache
|
||||
wifi_data=$(curl -s 'https://login.wifionice.de/cna/wifi/user_info')
|
||||
if [[ $(echo "$wifi_data" | jq -r '.result.authenticated') == "0" ]]; then
|
||||
curl 'https://login.wifionice.de/cna/logon' -X POST
|
||||
fi
|
||||
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue