summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2022-12-24 01:58:59 +0100
committerChristian Pointner <equinox@spreadspace.org>2022-12-25 03:16:39 +0100
commita88ce7b965c1d4c03aac02c1c8be819cff0f9f6e (patch)
tree5af2982447fe3ee7659de124cb2561eba65548d0 /files
parentx509/uacme: implement self-signed interim certificate (diff)
mz-(router|ap): upgrade to openwrt 22.03.2
Diffstat (limited to 'files')
-rw-r--r--files/common/openwrt/list-stations14
1 files changed, 14 insertions, 0 deletions
diff --git a/files/common/openwrt/list-stations b/files/common/openwrt/list-stations
new file mode 100644
index 00000000..6cd21671
--- /dev/null
+++ b/files/common/openwrt/list-stations
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+interfaces=$(iw dev | grep "Interface " | cut -d ' ' -f2 | sort)
+
+for interface in $interfaces; do
+ bssid=$(iw $interface info | grep "addr " | cut -d ' ' -f2)
+ essid=$(iw $interface info | grep "ssid " | cut -d ' ' -f2-)
+ channel=$(iw $interface info | grep "channel " | cut -d ' ' -f2-)
+ echo "$interface ($bssid, ssid: '$essid', channel: $channel)"
+ iw $interface station dump | grep "^Station" | awk '{ print(" - "$2) }'
+ echo ""
+done
+
+exit 0