projects
/
openhab-process.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'master' of rvb.name:openhab-process
[openhab-process.git]
/
mqtt-bt
/
bt-proximity~
1
#!/bin/sh
2
3
. /etc/bt-proximity.conf
4
5
host=`hostname`
6
7
hciconfig hci0 up
8
9
cat $1 | while read mac user
10
do
11
12
if [ "$mac" != "" ]
13
then
14
l2ping -c 2 -t 10 $mac
15
if [ "$?" = "0" ]
16
then
17
mosquitto_pub -h $mqtt_host -p $mqtt_port -u $mqtt_user -P $mqtt_passwd -t $mqtt_topic/$user -m $host
18
fi
19
fi
20
21
done