You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
749 B

#!/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
}