4 # description: Startup/shutdown script for MiniDLNA daemon
6 # Based on the MiniUPnPd script by Thomas Bernard
7 # Modified for MiniDLNA by Justin Maggard <jmaggard@users.sourceforge.net>
8 # Status function added by Igor Drobot
12 # Required-Start: $network $local_fs $remote_fs
13 # Required-Stop:: $network $local_fs $remote_fs
16 # Default-Start: 2 3 4 5
18 # Short-Description: DLNA/UPnP-AV media server
21 MINIDLNA
=:SBINDIR
:/minidlnad
22 PIDFILE
=/var
/run
/minidlna
/minidlna.pid
23 CONF
=/etc
/minidlna.conf
26 test -f $MINIDLNA ||
exit 0
28 .
/lib
/lsb
/init-functions
31 start
) log_daemon_msg
"Starting minidlna" "minidlna"
32 start-stop-daemon
--start --quiet --pidfile $PIDFILE --startas $MINIDLNA -- $ARGS $LSBNAMES
35 stop
) log_daemon_msg
"Stopping minidlna" "minidlna"
36 start-stop-daemon
--stop --quiet --pidfile $PIDFILE
39 restart|reload|force-reload
)
40 log_daemon_msg
"Restarting minidlna" "minidlna"
41 start-stop-daemon
--stop --retry 5 --quiet --pidfile $PIDFILE
42 start-stop-daemon
--start --quiet --pidfile $PIDFILE --startas $MINIDLNA -- $ARGS $LSBNAMES
46 status_of_proc
-p $PIDFILE $MINIDLNA minidlna
&& exit 0 ||
exit $?
48 *) log_action_msg
"Usage: /etc/init.d/minidlna {start|stop|restart|reload|force-reload|status}"