aboutsummaryrefslogtreecommitdiffstats
path: root/main/minidlna/minidlna.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2014-10-05 13:33:41 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2014-10-05 13:33:41 +0200
commit32f6612ae3a8c02ba56e0a2bf9aded658cb82dde (patch)
treefa3a2f821df742ef0074520ca08a49709a3c0f30 /main/minidlna/minidlna.initd
parentc8b3993f9f65f4c12fad193dfc5d15cde75783e3 (diff)
downloadaports-32f6612ae3a8c02ba56e0a2bf9aded658cb82dde.tar.bz2
aports-32f6612ae3a8c02ba56e0a2bf9aded658cb82dde.tar.xz
main/minidlna: move to main
Diffstat (limited to 'main/minidlna/minidlna.initd')
-rwxr-xr-xmain/minidlna/minidlna.initd26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/minidlna/minidlna.initd b/main/minidlna/minidlna.initd
new file mode 100755
index 0000000000..b53d5ce2fc
--- /dev/null
+++ b/main/minidlna/minidlna.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+name="MiniDLNA"
+configfile="${CONFIG:-/etc/minidlna.conf}"
+start_stop_daemon_args="--user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna}"
+pidfile="/var/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%/*}
+}
+