#!/bin/sh
oldlist=/tmp/assoclist.old
newlist=/tmp/assoclist.new
touch $oldlist # Create an empty file the first time through
while sleep 15
do
for iface in $(nvram get wl_ifnames)
do
wl -i $iface assoclist | awk '{print $2}' >> $newlist
done
for macaddr in $(grep -vxFf $oldlist $newlist)
do
arpinfo="$(arp -a | grep -iF $macaddr | awk '{print $1 " " $2}')"
logger -t wireless $macaddr $arpinfo "has connected."
done
for macaddr in $(grep -vxFf $newlist $oldlist)
do
arpinfo="$(arp -a | grep -iF $macaddr | awk '{print $1 " " $2}')"
logger -t wireless $macaddr $arpinfo "has disconnected."
done
mv $newlist $oldlist
done
#!/bin/sh
/jffs/scripts/wireless_monitor.sh &
We use essential cookies to make this site work, and optional cookies to enhance your experience.