aboutsummaryrefslogtreecommitdiff
path: root/ishome
blob: f5470394b8025f447fe6be6d254484d49b286326 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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