From 3e8f62c35fce80343b5359b45924f7bc3fc22d4f Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 13 Jul 2022 15:12:27 +0200 Subject: Initial commit --- ishome | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 ishome (limited to 'ishome') diff --git a/ishome b/ishome new file mode 100755 index 0000000..f547039 --- /dev/null +++ b/ishome @@ -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 -- cgit v1.2.3