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.

32 lines
761 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2009-2012 OpenWrt.org
  3. START=60
  4. USE_PROCD=1
  5. PROG=/usr/sbin/dmapd
  6. start_service() {
  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. procd_open_instance
  23. procd_set_param stdout 1
  24. procd_set_param stderr 1
  25. procd_set_param pidfile /var/run/dmapd.pid
  26. procd_set_param user dmapd
  27. procd_set_param command $PROG -f
  28. procd_close_instance
  29. }