Add bootup notification and dissasociation notification

This commit is contained in:
floh1111 2012-03-02 01:03:47 +00:00
parent 5ace9c2b82
commit f0050578fe
1 changed files with 11 additions and 6 deletions

View File

@ -1,13 +1,18 @@
#!/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:'`" != "" ]; then
wget -q -O - http://status.kreativitaet-trifft-technik.de/update/ff\?client_associated=`date +%s`\&clients_count=`/etc/clients.sh` & sleep 3; kill $!
#echo http://status.kreativitaet-trifft-technik.de/update/ff\?client_associated=`date +%s`\&clients_count=`/etc/clients.sh` & sleep 3; kill $!
fi
#echo `echo $LINE | grep 'wlan0:' | awk '{ print $4 }'` >> /var/log/clients_event.log
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