diff options
author | Marvin Borner | 2022-07-13 15:12:27 +0200 |
---|---|---|
committer | Marvin Borner | 2022-07-13 15:13:00 +0200 |
commit | 3e8f62c35fce80343b5359b45924f7bc3fc22d4f (patch) | |
tree | e80d8b8bed961e8381491ff52f50d4f0c34f5904 /ishome |
Initial commit
Diffstat (limited to 'ishome')
-rwxr-xr-x | ishome | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#!/bin/env sh + +WIFIBSS="xx:xx:xx:xx:xx:xx" +WIFISSID="HomeNet" + +set -e + +bss=$(iwctl station wlan0 show | grep "ConnectedBss" | awk '{print $2}') +wifi=$(iwctl station wlan0 show | grep "Connected network" | awk '{print $3}') + +if [ "$bss" = "$WIFIBSS" ] && [ "$wifi" = "$WIFISSID" ]; then + exit 0 +else + exit 1 +fi |