-
Notifications
You must be signed in to change notification settings - Fork 194
/
Copy pathbluealsa.service.in
71 lines (65 loc) · 1.87 KB
/
bluealsa.service.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[Unit]
Description=BlueALSA service
Documentation=man:bluealsa(8)
Requisite=dbus.service
After=bluetooth.service
# In order to customize BlueALSA D-Bus service one should create an override
# for this systemd unit file. Please note, that in the override file one will
# have to explicitly clear the ExecStart before setting it again. See the
# bluez-alsa wiki for more options.
#
# $ sudo systemctl edit bluealsa
# [Service]
# ExecStart=
# ExecStart=@bindir@/bluealsa -S --keep-alive=5 -p a2dp-sink
# When using low latency audio profile like HSP/HFP, it is recommended to set
# real-time scheduling priority for IO threads with the --io-rt-priority=NUM
# option. However, in order to allow BlueALSA to modify scheduling priority,
# one has to relax sandboxing rules.
#
# $ sudo systemctl edit bluealsa
# [Service]
# AmbientCapabilities=CAP_SYS_NICE
# CapabilityBoundingSet=CAP_SYS_NICE
# RestrictRealtime=false
# SystemCallFilter=@resources
[Service]
Type=dbus
BusName=org.bluealsa
User=@bluealsauser@
ExecStart=@bindir@/bluealsa @systemdbluealsaargs@
Restart=on-failure
# Sandboxing
AmbientCapabilities=CAP_NET_RAW
CapabilityBoundingSet=CAP_NET_RAW
IPAddressDeny=any
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
PrivateUsers=false
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=invisible
ProtectSystem=strict
RemoveIPC=true
RestrictAddressFamilies=AF_UNIX AF_BLUETOOTH
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
SystemCallFilter=~@resources @privileged
UMask=0077
# Setup state directory for persistent storage
ReadWritePaths=/var/lib/bluealsa
StateDirectory=bluealsa
[Install]
WantedBy=bluetooth.target