let PI try to enable sensorTag access on install

This commit is contained in:
Dave Conway-Jones 2016-05-26 19:42:22 +01:00
parent 0321bf8150
commit 4248b580ee
2 changed files with 10 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{
"name": "node-red-node-sensortag",
"description": "A Node-RED node to read data from a TI SensorTag",
"version": "0.0.14",
"version": "0.0.15",
"keywords": [
"node-red",
"sensortag",
@ -11,6 +11,9 @@
"dependencies": {
"sensortag": "~1.2.0"
},
"scripts" : {
"postinstall" : "scripts/pibt.sh"
},
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@ -0,0 +1,6 @@
#!/bin/bash
if grep -q ARM /proc/cpuinfo
then
sudo apt-get install libbluetooth-dev libudev-dev pi-bluetooth
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
fi