packages/sound/pulseaudio/files/pulseaudio.init
tripolar b3c8c23ce3 [packages]: pulseaudio - revert accidently commited code
Signed-off-by: Peter Wagner <tripolar@gmx.at>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@38123 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-09-22 17:46:39 +00:00

32 lines
749 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() {
user_exists pulse 51 || user_add pulse 51
group_exists pulse 51 || group_add pulse 51
[ -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
}