2011-03-03 00:41:26 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2011 OpenWrt.org
|
2011-11-13 22:16:21 +00:00
|
|
|
|
2011-03-03 00:41:26 +00:00
|
|
|
START=65
|
|
|
|
|
2011-11-13 22:16:21 +00:00
|
|
|
SERVICE_USE_PID=1
|
|
|
|
SERVICE_PID_FILE=/var/run/pulse/pid
|
|
|
|
|
2011-03-03 00:41:26 +00:00
|
|
|
start() {
|
2011-11-13 22:16:21 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
service_start /usr/bin/pulseaudio --daemonize --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1
|
2011-03-03 00:41:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-13 22:16:21 +00:00
|
|
|
service_stop /usr/bin/pulseaudio
|
2011-03-03 00:41:26 +00:00
|
|
|
}
|