From 32f6612ae3a8c02ba56e0a2bf9aded658cb82dde Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Sun, 5 Oct 2014 13:33:41 +0200 Subject: main/minidlna: move to main --- main/minidlna/minidlna.initd | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 main/minidlna/minidlna.initd (limited to 'main/minidlna/minidlna.initd') 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%/*} +} + -- cgit v1.2.3