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.

30 lines
767 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2009-2012 OpenWrt.org
  3. START=60
  4. start() {
  5. user_exists dmapd 56 || user_add dmapd 56
  6. group_exists dmapd 56 || group_add dmapd 56
  7. [ -d /var/run/dmapd ] || {
  8. mkdir -m 0755 -p /var/run/dmapd
  9. chown dmapd:dmapd /var/run/dmapd
  10. }
  11. [ -d /var/db/dmapd/DAAP ] || {
  12. mkdir -m 0755 -p /var/db/dmapd/DAAP
  13. chown dmapd:dmapd /var/db/dmapd/DAAP
  14. }
  15. [ -d /var/db/dmapd/DPAP ] || {
  16. mkdir -m 0755 -p /var/db/dmapd/DPAP
  17. chown dmapd:dmapd /var/db/dmapd/DPAP
  18. }
  19. mkdir -m 0755 -p /var/lock/subsys
  20. mkdir -m 0755 -p /var/media/music
  21. mkdir -m 0755 -p /var/media/pictures
  22. service_start /usr/sbin/dmapd -u dmapd -g dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
  23. }
  24. stop() {
  25. service_stop /usr/sbin/dmapd
  26. }