2009-12-07 16:48:21 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-01-23 12:26:58 +00:00
|
|
|
# Copyright (C) 2009-2012 OpenWrt.org
|
2009-12-07 16:48:21 +00:00
|
|
|
|
|
|
|
START=60
|
|
|
|
|
|
|
|
start() {
|
2011-11-13 22:15:43 +00:00
|
|
|
user_exists dmapd 56 || user_add dmapd 56
|
|
|
|
group_exists dmapd 56 || group_add dmapd 56
|
|
|
|
[ -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
|
|
|
|
}
|
2012-01-23 12:26:58 +00:00
|
|
|
[ -d /var/db/dmapd/DPAP ] || {
|
|
|
|
mkdir -m 0755 -p /var/db/dmapd/DPAP
|
|
|
|
chown dmapd:dmapd /var/db/dmapd/DPAP
|
|
|
|
}
|
2011-11-13 22:15:43 +00:00
|
|
|
mkdir -m 0755 -p /var/lock/subsys
|
|
|
|
mkdir -m 0755 -p /var/media/music
|
|
|
|
mkdir -m 0755 -p /var/media/pictures
|
2010-01-30 23:29:11 +00:00
|
|
|
|
2011-11-13 22:15:43 +00:00
|
|
|
service_start /usr/sbin/dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
|
2009-12-07 16:48:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2011-11-13 22:15:43 +00:00
|
|
|
service_stop /usr/sbin/dmapd
|
2009-12-07 16:48:21 +00:00
|
|
|
}
|