Add to git.
[dlife.git] / dlife.rc
1 #!/bin/sh
2 #
3 # dlife.rc      This shell script takes care of starting and stopping
4 #               the dlife client.
5 #
6 # chkconfig: 2345 80 30
7 # description: The Distributed Artificial Life client.
8 # processname: dlife_soup
9 # config: /etc/dlife/soup.conf
10
11 # Source function library.
12 . /etc/init.d/functions
13
14 # Source networking configuration.
15 . /etc/sysconfig/network
16
17 # Check that networking is up.
18 [ ${NETWORKING} = "no" ] && exit 0
19
20 [ -f /usr/bin/dlife_soup ] || exit 0
21
22 # See how we were called.
23 case "$1" in
24   start)
25         # Start daemons.
26         echo -n "Starting dlife: "
27         daemon /usr/bin/dlife_soup
28         echo
29         ;;
30   stop)
31         # Stop daemons.
32         echo -n "Shutting down dlife: "
33         killproc dlife_soup
34         echo
35         ;;
36   restart)
37         $0 stop
38         $0 start
39         ;;
40   status)
41         status dlife_soup
42         ;;
43   *)
44         echo "Usage: dlife.rc {start|stop|restart|status}"
45         exit 1
46 esac
47
48 exit 0
49