0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/net/dmapd/files/dmapd.init
W. Michael Petullo 9af54304b8 dmapd: update to 0.0.84
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2019-11-09 22:57:21 -05:00

29 lines
634 B
Bash

#!/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 ] || {
mkdir -m 0755 -p /var/db/dmapd
chown dmapd:dmapd /var/db/dmapd
}
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
}