1
0
forked from ports/opt

pulseaudio: add pulse user/group via post-install, the dbus config uses it

This commit is contained in:
Tim Biermann 2024-01-20 12:28:00 +01:00
parent b12cacb31c
commit 911bffe9a0
Signed by untrusted user: tb
GPG Key ID: 42F8B4E30B673606
2 changed files with 8 additions and 16 deletions

View File

@ -16,19 +16,3 @@ exec /usr/bin/myawesomewm
See [What is wrong with system mode? PulseAudio](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/)
for more information.
This was previously a pre-install script:
```sh
#!/bin/sh
# check for pulseaudio group or add one
getent group pulse || /usr/sbin/groupadd pulse
getent group pulse-access || /usr/sbin/groupadd pulse-access
# check for pulseaudio user or add one
getent passwd pulse || /usr/sbin/useradd -g pulse -d /var/lib/pulse -s /bin/false -c "Pulseaudio User" pulse
# lock the account
/usr/bin/passwd -l pulse
```

View File

@ -1,2 +1,10 @@
#!/bin/sh
_USER=pulse
_HOME=/var/lib/pulse
_GROUP=pulse
/usr/bin/getent group $_GROUP > /dev/null 2>&1 || /usr/sbin/groupadd $_GROUP
/usr/bin/getent passwd $_USER > /dev/null 2>&1 || /usr/sbin/useradd -c 'postgres system user' -g $_GROUP -d $_HOME -s /bin/false $_USER
#passwd -l $_USER > /dev/null
[ -e /usr/share/glib-2.0/schemas/org.freedesktop.pulseaudio.gschema.xml ] && glib-compile-schemas /usr/share/glib-2.0/schemas || true