]> git.pld-linux.org Git - packages/edna.git/blob - edna.init
- tabs in preamble
[packages/edna.git] / edna.init
1 #!/bin/sh
2 #
3 # ices          This shell script takes care of starting and stopping
4 #               edna.
5 #
6 # chkconfig:    345 96 24
7 # description:  edna allows you to access your MP3 collection from any
8 #               networked computer. This software streams your MP3s via
9 #               HTTP to any MP3 player that supports playing off a remote
10 #               connection (e.g. Winamp, FreeAmp, Sonique, XMMS).
11
12 # Source function library.
13 . /etc/rc.d/init.d/functions
14
15 # Source networking configuration.
16 . /etc/sysconfig/network
17
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20         if [ ! -f /var/lock/subsys/network ]; then
21                 msg_network_down edna
22                 exit 1
23         fi
24 else
25         exit 0
26 fi
27
28 # See how we were called.
29 case "$1" in
30   start)
31         # Start daemons.
32         msg_starting edna
33         export PYTHONPATH=/usr/lib/edna
34         cd /etc/edna
35         exec python /usr/bin/edna /etc/edna/edna.conf 2> /dev/null &
36         ok
37         touch /var/lock/subsys/edna
38         ;;
39   stop)
40         # Stop daemons.
41         msg_stopping edna
42         killproc edna 2> /dev/null
43         rm -f /var/lock/subsys/edna
44         ;;
45   restart|reload)
46         $0 stop
47         $0 start
48         ;;
49   status)
50         status edna
51         ;;
52   *)
53         msg_usage "$0 {start|stop|restart|reload|status}"
54         exit 1
55 esac
56
57 exit 0
This page took 0.069212 seconds and 3 git commands to generate.