aboutsummaryrefslogtreecommitdiffstats
path: root/community/minidlna/minidlna.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-12-06 14:50:57 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2016-12-06 15:05:33 +0100
commit4dd9320140988c58abc574e73693fe399450d57c (patch)
tree4606775b9caadd0bfa2dc29f06d6ff758ffdfc30 /community/minidlna/minidlna.initd
parent1aa57bdbcfaa3564456c98a0fd748ea417d1c157 (diff)
downloadaports-4dd9320140988c58abc574e73693fe399450d57c.tar.bz2
aports-4dd9320140988c58abc574e73693fe399450d57c.tar.xz
community/minidlna: move to community and update db dir
moved db dir from /var/cache to /var/lib added a check in post-upgrade to notify use of this change
Diffstat (limited to 'community/minidlna/minidlna.initd')
-rw-r--r--community/minidlna/minidlna.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/minidlna/minidlna.initd b/community/minidlna/minidlna.initd
new file mode 100644
index 0000000000..f91733bbee
--- /dev/null
+++ b/community/minidlna/minidlna.initd
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+
+name="MiniDLNA"
+configfile="${CONFIG:-/etc/minidlna.conf}"
+start_stop_daemon_args="--user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna}"
+pidfile="/run/minidlna/minidlna.pid"
+command=/usr/sbin/minidlnad
+command_args="-f ${configfile} -P $pidfile"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ if ! [ -f "${configfile}" ]; then
+ eerror "${configfile} is missing"
+ return 1
+ fi
+ if yesno "${RESCAN}"; then
+ command_args="$command_args -R"
+ fi
+
+ checkpath --owner ${M_USER:-minidlna}:${M_GROUP:-minidlna} \
+ --directory ${pidfile%/*}
+}
+