firmware/bsp/default/root_file_system/etc/clients_event.sh
Tim Niemeyer b4d756cb91 New build_script structure.
The new build_script uses a bsp-style interface. Now it's possible
to work on more than one board at the same time. Just select the
selected_bsp with the build_script and start over.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
2012-09-29 18:58:44 +02:00

18 lines
646 B
Bash
Executable file

#!/bin/sh
i=`/etc/clients.sh`
wget -q -O - http://status.kreativitaet-trifft-technik.de/update/ff\?bootup=`date +%s`\&clients_count=$i
while read LINE
do
if [ "`echo $LINE | grep 'wlan0: new station'`" != "" ]; then
i=`expr $i + 1`
wget -q -O - http://status.kreativitaet-trifft-technik.de/update/ff\?client_associated=`date +%s`\&clients_count=$i
fi
if [ "`echo $LINE | grep 'wlan0: unknown event 20'`" != "" ]; then
i=`expr $i - 1`
wget -q -O - http://status.kreativitaet-trifft-technik.de/update/ff\?client_disassociated=`date +%s`\&clients_count=$i
fi
done