Last change
on this file since 13567 was
13567,
checked in by obi, 11 years ago
|
[titan] add minidlna-1.0.22 first step
|
-
Property svn:executable set to
*
|
File size:
1.4 KB
|
Rev | Line | |
---|
[13567] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | # chkconfig: 345 99 10 |
---|
| 4 | # description: Startup/shutdown script for MiniDLNA daemon |
---|
| 5 | # |
---|
| 6 | # Based on the MiniUPnPd script by Thomas Bernard |
---|
| 7 | # Modified for MiniDLNA by Justin Maggard <jmaggard@users.sourceforge.net> |
---|
| 8 | # |
---|
| 9 | ### BEGIN INIT INFO |
---|
| 10 | # Provides: minidlna |
---|
| 11 | # Required-Start: $network $local_fs $remote_fs |
---|
| 12 | # Required-Stop:: $network $local_fs $remote_fs |
---|
| 13 | # Should-Start: $all |
---|
| 14 | # Should-Stop: $all |
---|
| 15 | # Default-Start: 2 3 4 5 |
---|
| 16 | # Default-Stop: 0 1 6 |
---|
| 17 | # Short-Description: DLNA/UPnP-AV media server |
---|
| 18 | ### END INIT INFO |
---|
| 19 | |
---|
| 20 | MINIDLNA=/usr/sbin/minidlna |
---|
| 21 | ARGS='-f /etc/minidlna.conf' |
---|
| 22 | |
---|
| 23 | test -f $MINIDLNA || exit 0 |
---|
| 24 | |
---|
| 25 | . /lib/lsb/init-functions |
---|
| 26 | |
---|
| 27 | case "$1" in |
---|
| 28 | start) log_daemon_msg "Starting minidlna" "minidlna" |
---|
| 29 | start-stop-daemon --start --quiet --pidfile /var/run/minidlna.pid --startas $MINIDLNA -- $ARGS $LSBNAMES |
---|
| 30 | log_end_msg $? |
---|
| 31 | ;; |
---|
| 32 | stop) log_daemon_msg "Stopping minidlna" "minidlna" |
---|
| 33 | start-stop-daemon --stop --quiet --pidfile /var/run/minidlna.pid |
---|
| 34 | log_end_msg $? |
---|
| 35 | ;; |
---|
| 36 | restart|reload|force-reload) |
---|
| 37 | log_daemon_msg "Restarting minidlna" "minidlna" |
---|
| 38 | start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/minidlna.pid |
---|
| 39 | start-stop-daemon --start --quiet --pidfile /var/run/minidlna.pid --startas $MINIDLNA -- $ARGS $LSBNAMES |
---|
| 40 | log_end_msg $? |
---|
| 41 | ;; |
---|
| 42 | *) log_action_msg "Usage: /etc/init.d/minidlna {start|stop|restart|reload|force-reload}" |
---|
| 43 | exit 2 |
---|
| 44 | ;; |
---|
| 45 | esac |
---|
| 46 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.