mirror of
https://github.com/kawasaki/pyscrlink.git
synced 2025-09-05 01:00:23 +02:00
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>
7 lines
252 B
Bash
Executable File
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
|
|
|