We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 121d483 commit f694b47Copy full SHA for f694b47
root/etc/s6-overlay/s6-rc.d/svc-homeassistant/run
@@ -3,7 +3,12 @@
3
4
PY_LOCAL_PATH=$(find /usr/local/lib -maxdepth 1 -name python* -type d)
5
PY_LOCAL_BIN=$(basename "${PY_LOCAL_PATH}")
6
-setcap 'cap_net_raw,cap_net_admin,cap_net_bind_service=+ep' "/usr/local/bin/${PY_LOCAL_BIN}"
+if capsh --has-p=cap_net_admin 2>/dev/null && capsh --has-p=cap_net_raw 2>/dev/null; then
7
+ echo "Adding cap_net_admin and cap_net_raw to python binary for bt access"
8
+ setcap 'cap_net_bind_service,cap_net_raw,cap_net_admin=+ep' "/usr/local/bin/${PY_LOCAL_BIN}"
9
+else
10
+ setcap 'cap_net_bind_service=+ep' "/usr/local/bin/${PY_LOCAL_BIN}"
11
+fi
12
13
if [[ -z "${DISABLE_JEMALLOC+x}" ]]; then
14
export LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
0 commit comments