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.

29 lines
661 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2011 OpenWrt.org
  3. START=99
  4. STOP=65
  5. USE_PROCD=1
  6. PROG=/usr/bin/pulseaudio
  7. start_service() {
  8. [ -d /var/run/pulse ] || {
  9. mkdir -m 0755 -p /var/run/pulse
  10. chmod 0750 /var/run/pulse
  11. chown pulse:pulse /var/run/pulse
  12. }
  13. [ -d /var/lib/pulse ] || {
  14. mkdir -m 0755 -p /var/lib/pulse
  15. chmod 0750 /var/lib/pulse
  16. chown pulse:pulse /var/lib/pulse
  17. }
  18. chown root:pulse /dev/snd/* /dev/mixer /dev/dsp
  19. chmod 664 /dev/snd/* /dev/mixer /dev/dsp
  20. procd_open_instance
  21. procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false
  22. procd_close_instance
  23. }