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

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