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

#!/bin/sh /etc/rc.common
# Copyright (C) 2009-2012 OpenWrt.org
START=60
USE_PROCD=1
PROG=/usr/sbin/dmapd
start_service() {
[ -d /var/run/dmapd ] || {
mkdir -m 0755 -p /var/run/dmapd
chown dmapd:dmapd /var/run/dmapd
}
[ -d /var/db/dmapd/DAAP ] || {
mkdir -m 0755 -p /var/db/dmapd/DAAP
chown dmapd:dmapd /var/db/dmapd/DAAP
}
[ -d /var/db/dmapd/DPAP ] || {
mkdir -m 0755 -p /var/db/dmapd/DPAP
chown dmapd:dmapd /var/db/dmapd/DPAP
}
mkdir -m 0755 -p /var/lock/subsys
mkdir -m 0755 -p /var/media/music
mkdir -m 0755 -p /var/media/pictures
procd_open_instance
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /var/run/dmapd.pid
procd_set_param user dmapd
procd_set_param command $PROG -f
procd_close_instance
}