]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/mediatomb
Merge branch 'master' of ssh://stevee@git.ipfire.org/pub/git/ipfire-2.x
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / mediatomb
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/
4 #
5 # Description : mediatomb initscript
6 #
7 # Authors : Arne Fitzenreiter
8 #
9 # Version : 01.00
10 #
11 # Notes : for www.ipfire.org - GPLv3
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 case "$1" in
19 start)
20 boot_mesg "Starting mediatomb uPnP Mediaserver..."
21 route add -net 239.0.0.0 netmask 255.0.0.0 green0
22 loadproc /usr/bin/mediatomb -u nobody -g nobody \
23 -c /var/ipfire/mediatomb/config.xml \
24 -l /var/log/mediatomb.log \
25 -e green0 $2 $3 $4 $5 $6 $7 -d
26 evaluate_retval
27 ;;
28
29
30 stop)
31 boot_mesg "Stopping mediatomb uPnP Mediaserver..."
32 killproc /usr/bin/mediatomb
33 evaluate_retval
34 route del -net 239.0.0.0 netmask 255.0.0.0 green0
35 ;;
36
37 restart)
38 ${0} stop
39 sleep 1
40 ${0} start
41
42 ;;
43 status)
44 statusproc /usr/bin/mediatomb
45 ;;
46
47 *)
48 echo "Usage: ${0} {start|stop|init|status}"
49 exit 1
50 ;;
51 esac
52
53 # End $rc_base/init.d/