import repository from arizona
[raven.git] / 2.0 / python / storkbtsharedaemon
1 #!/bin/sh
2 #
3 # storkbtsharedaemon      Starts storkbtsharedaemon
4 #
5 # chkconfig: 2345 92 33
6 # description: Starts the storkbtshare program, which shares torrent files
7 #              downloaded by storktorrent
8 #
9 ### BEGIN INIT INFO
10
11 # Source function library.
12 . /etc/init.d/functions
13
14 [ -f /usr/local/stork/bin/storkbtshare.py ] || exit 0
15
16
17 start() {
18         echo -n $"Starting storkbtshare service: "
19         daemon /usr/local/stork/bin/storkbtshare.py
20         RETVAL=$?
21         echo
22         return $RETVAL
23 }
24
25 stop() {
26         echo -n $"Shutting down storkbtshare service: "
27         killproc storkbtshare.py
28         RETVAL2=$?
29         echo ""
30         return $RETVAL
31 }
32
33 restart() {
34         stop
35         start
36 }
37
38 rhstatus() {
39         status storkbtshare.py
40         exit $?
41 }
42
43
44 case "$1" in
45   start)
46         start
47         ;;
48   stop)
49         stop
50         ;;
51   restart|reload|condrestart)
52         restart
53         ;;
54   status)
55         rhstatus
56         ;;
57   *)
58         echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
59         exit 1
60 esac
61
62 exit $?