Added pulseaudio-daemon

NOTE: You MUST define the $USER variable in the conf file before starting this service, or else it won't start.

I opted for making a system service running as my user since it's my personal preference, but if you prefer that this be a user service
then you can refer to the runit init system website's FAQ: http://smarden.org/runit/faq.html

Instead of
exec chpst -u floyd runsvdir /home/floyd/service

(if your user is floyd)

Replace it with
exec chpst -u floyd:audio runsvdir /home/floyd/service

To run these services as your user as part of the audio group, which is neccessary for pulseaudio to access your audio device files.

If you're already part of the audio group then you can ignore what I just said above.
This commit is contained in:
AwesomeAdam54321 2021-06-22 10:00:18 +02:00
parent 114828e973
commit 4162a4c17c
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,4 @@
#Write your username below in the $USER variable, and change the $HOME variable if that isn't your home directory.
#It's a matter of personal preference if you would like the pulseaudio-daemon to be run as a user service or as a system service running as a user, I went for the latter.
USER=
HOME=/home/$USER

3
sv/pulseaudio-daemon/run Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
[ -r ./conf ] && . ./conf
exec chpst -u $USER:audio pulseaudio --daemonize=no --log-target=syslog