packages/sound/pulseaudio/files/pulseaudio.init
John Crispin d4042ec35e generic userid: use the new USERID api
recent changes in trunk allow us to specify the userid inside the openwrt makefile.
the info is stored int he meta data of the IPK contorl file and users are generated
by the new generic postinst trigger.

Signed-off-by: John Crispin <blogic@openwrt.org>
2014-10-08 03:45:30 +02:00

29 lines
661 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2011 OpenWrt.org
START=65
STOP=65
USE_PROCD=1
PROG=/usr/bin/pulseaudio
start_service() {
[ -d /var/run/pulse ] || {
mkdir -m 0755 -p /var/run/pulse
chmod 0750 /var/run/pulse
chown pulse:pulse /var/run/pulse
}
[ -d /var/lib/pulse ] || {
mkdir -m 0755 -p /var/lib/pulse
chmod 0750 /var/lib/pulse
chown pulse:pulse /var/lib/pulse
}
chown root:pulse /dev/snd/* /dev/mixer /dev/dsp
chmod 664 /dev/snd/* /dev/mixer /dev/dsp
procd_open_instance
procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false
procd_close_instance
}