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.

28 lines
641 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2007-2011 OpenWrt.org
  3. START=93
  4. start() {
  5. #create mpd directories
  6. pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
  7. if [ ! -d $pld ]; then
  8. mkdir -m 0755 -p $pld
  9. fi
  10. # Set the initial volume to something manageable
  11. [ -x /usr/bin/amixer ] && /usr/bin/amixer set PCM 40
  12. if [ -x /bin/nice ]; then
  13. # This has real-time constraints, so let's at least tell the OS
  14. # that this should have higher priority to avoid skipping
  15. # when doing other things in the background.
  16. nice -n -10
  17. fi
  18. service_start /usr/bin/mpd
  19. }
  20. stop() {
  21. service_stop /usr/bin/mpd
  22. }