Files
pyscrlink/setcap.sh
Shin'ichiro Kawasaki 762141efbf setcap.sh: Add helper script to set bluepy-helper capability
To avoid sudo for scratch_link.py, it is required to set capability to
bluepy-helper executable so that normal users can connect to BLE devices
through bluepy. To simplify the command line to do this, add the helper
script setcap.sh.

Signed-off-by: Shin'ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
2020-08-01 14:20:07 +09:00

7 lines
252 B
Bash
Executable File

#!/bin/sh
echo "Set up bluepy-helper capability to allow use by normal users"
find /usr -name bluepy-helper -exec sudo setcap \
'cap_net_raw,cap_net_admin+eip' {} \; 2> /dev/null
find /usr -name bluepy-helper -exec sudo getcap {} \; 2> /dev/null