diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-05 13:33:41 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-05 13:33:41 +0200 |
commit | 32f6612ae3a8c02ba56e0a2bf9aded658cb82dde (patch) | |
tree | fa3a2f821df742ef0074520ca08a49709a3c0f30 /main/minidlna/minidlna.initd | |
parent | c8b3993f9f65f4c12fad193dfc5d15cde75783e3 (diff) | |
download | aports-32f6612ae3a8c02ba56e0a2bf9aded658cb82dde.tar.bz2 aports-32f6612ae3a8c02ba56e0a2bf9aded658cb82dde.tar.xz |
main/minidlna: move to main
Diffstat (limited to 'main/minidlna/minidlna.initd')
-rwxr-xr-x | main/minidlna/minidlna.initd | 26 |
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%/*} +} + |