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
634 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 ] || {
  12. mkdir -m 0755 -p /var/db/dmapd
  13. chown dmapd:dmapd /var/db/dmapd
  14. }
  15. mkdir -m 0755 -p /var/lock/subsys
  16. mkdir -m 0755 -p /var/media/music
  17. mkdir -m 0755 -p /var/media/pictures
  18. procd_open_instance
  19. procd_set_param stdout 1
  20. procd_set_param stderr 1
  21. procd_set_param pidfile /var/run/dmapd.pid
  22. procd_set_param user dmapd
  23. procd_set_param command $PROG -f
  24. procd_close_instance
  25. }