]> git.pld-linux.org Git - packages/dss.git/blob - dss.init
add gcc43.patch
[packages/dss.git] / dss.init
1 #!/bin/sh
2 #
3 # dss           Start/Stop MPEG-4 streaming server
4 #
5 # chkconfig:    345 13 87
6 #
7 # description:  An MPEG-4 video and audio streaming server. \
8 #               Enable this if you wish to run an internet TV station.
9 #
10 # processname:  DarwinStreamingServer
11 # config:
12 # pidfile:              DarwinStreamingServer.pid
13 #
14 # $Id$
15
16 # Source function library
17 . /etc/rc.d/init.d/functions
18
19 # Get network config
20 . /etc/sysconfig/network
21
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24         if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25                 msg_network_down "Darwin Streaming Server"
26                 exit 1
27         fi
28 else
29         exit 0
30 fi
31
32 # Get service config - may override defaults
33 [ -f /etc/sysconfig/dss ] && . /etc/sysconfig/dss
34
35 start() {
36         # Check if the service is already running?
37         if [ -f /var/lock/subsys/dss ]; then
38                 msg_already_running "Darwin Streaming Server"
39                 return
40         fi
41
42         msg_starting "Darwin Streaming Server"
43         daemon /usr/sbin/DarwinStreamingServer
44         RETVAL=$?
45         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dss
46 }
47
48 stop() {
49         if [ ! -f /var/lock/subsys/dss ]; then
50                 msg_not_running "Darwin Streaming Server"
51                 return
52         fi
53
54         # Stop daemons.
55         msg_stopping "Darwin Streaming Server"
56         killproc --pidfile /var/run/DarwinStreamingServer.pid DarwinStreamingServer
57         rm -f /var/lock/subsys/dss
58 }
59
60 condrestart() {
61         if [ ! -f /var/lock/subsys/dss ]; then
62                 msg_not_running "Darwin Streaming Server"
63                 RETVAL=$1
64                 return
65         fi
66
67         stop
68         start
69 }
70
71 RETVAL=0
72 # See how we were called.
73 case "$1" in
74   start)
75         start
76         ;;
77   stop)
78         stop
79         ;;
80   restart)
81         stop
82         start
83         ;;
84   try-restart)
85         condrestart 0
86         ;;
87   force-reload)
88         condrestart 7
89         ;;
90   status)
91         status --pidfile /var/run/DarwinStreamingServer.pid dss DarwinStreamingServer
92         RETVAL=$?
93         ;;
94   *)
95         msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
96         exit 3
97 esac
98
99 exit $RETVAL
This page took 0.089001 seconds and 3 git commands to generate.