packages/dmapd: use new service functions, create dmapd user & group and required directories
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29058 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e8a76b5857
commit
cf0e4e9e2e
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dmapd
|
||||
PKG_VERSION:=0.0.43
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.flyn.org/projects/dmapd
|
||||
|
@ -1,16 +1,27 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
# Copyright (C) 2009-2011 OpenWrt.org
|
||||
|
||||
START=60
|
||||
|
||||
start() {
|
||||
mkdir -p /var/cache/dmapd/
|
||||
mkdir -p /var/run/dmapd/
|
||||
mkdir -p /var/lock/subsys/
|
||||
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
|
||||
}
|
||||
mkdir -m 0755 -p /var/lock/subsys
|
||||
mkdir -m 0755 -p /var/media/music
|
||||
mkdir -m 0755 -p /var/media/pictures
|
||||
|
||||
DMAPD_DB_MODULE=bdb /usr/sbin/dmapd --vips-disc-threshold 64k
|
||||
DMAPD_DB_MODULE=bdb \
|
||||
service_start /usr/sbin/dmapd -m /var/media/music -p /var/media/pictures --vips-disc-threshold 64k
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall dmapd 2> /dev/null
|
||||
service_stop /usr/sbin/dmapd
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user