summarylogtreecommitdiffstats
path: root/wireplumber-workaround.service
blob: 5b5f1d825943d2b25be948364bf6ea64f75b779f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[Unit]
Description=Workaround wireplumber needing to be written into by hardware-audio-processing
ConditionPathExists=/usr/share/wireplumber
After=local-fs.target

[Service]
Type=oneshot
# Copy if it doesn't exist
ExecStartPre=/usr/bin/bash -c "[ -d /usr/local/share/.wireplumber ] || /usr/bin/cp -r /usr/share/wireplumber /usr/local/share/.wireplumber"
ExecStart=/usr/bin/mount --bind /usr/local/share/.wireplumber /usr/share/wireplumber
# Clean-up after ourselves
ExecStop=/usr/bin/umount /usr/share/wireplumber
ExecStop=/usr/bin/rm -r /usr/local/share/.wireplumber
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target