packages/net/dmapd/files/dmapd.init
swalker c7d5e5dbd4 [packages] dmapd: update to 0.0.46 (#10734, thanks flyn), create DPAP directory, refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29872 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-23 12:26:58 +00:00

31 lines
749 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2009-2012 OpenWrt.org
START=60
start() {
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
}
[ -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
service_start /usr/sbin/dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
}
stop() {
service_stop /usr/sbin/dmapd
}