--- /etc/default/minidlna.orig 1969-12-31 21:00:00.000000000 -0300 +++ /etc/default/minidlna 2009-09-20 00:33:15.000000000 -0300 @@ -0,0 +1,10 @@ +# Configuration file for minidlna server + +# MINIDLNA_IP configures the bind address. By init default, 0.0.0.0 is assumed. + +MINIDLNA_IP="192.168.10.2" + +# MINIDLNA_CONF configures the config file path. Init default is to "/etc/minidlna.conf" + +MINIDLNA_CONF="/etc/minidlna.conf" + --- /etc/init.d/minidlna.orig 1969-12-31 21:00:00.000000000 -0300 +++ /etc/init.d/minidlna 2009-09-20 00:36:12.000000000 -0300 @@ -0,0 +1,44 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: minidlna +# Required-Start: $network +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Should-Start: minidlna +# Should-Stop: +# Short-Description: start minidlna daemons +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +MINIDLNA_BIN="/usr/sbin/minidlna" +MINIDLNA_IP=0.0.0.0 +MINIDLNA_CONF="/etc/minidlna.conf" + +[ ! -f /etc/default/minidlna ] || . /etc/default/minidlna +test -f /lib/lsb/init-functions || exit 1 +. /lib/lsb/init-functions + + +case "${1}" in +("start") + log_begin_msg "Starting MiniDLNA UPNP Media daemon..." + start-stop-daemon --start --quiet \ + --exec "${MINIDLNA_BIN}" -- -a ${MINIDLNA_IP} -f ${MINIDLNA_CONF} + log_end_msg $? + ;; +("stop") + log_begin_msg "Stopping MiniDLNA UPNP Media daemon..." + start-stop-daemon --stop --retry=1 --quiet --oknodo --exec "${MINIDLNA_BIN}" + log_end_msg $? + exit $? + ;; +("restart" | "force-reload") + "${0}" stop + "${0}" start + ;; +(*) + log_success_msg "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac