]> git.pld-linux.org Git - packages/coda.git/blob - coda.update.init
326f8b846ea9cc1cb82cc1ce687dc5a02b9af2ed
[packages/coda.git] / coda.update.init
1 #!/bin/sh
2 #
3 # update                
4 #
5 # chkconfig:    345 95 02
6 #
7 # description:  The Coda update server and clients
8 #
9
10 # Source function library
11 . /etc/rc.d/init.d/functions
12
13 # Get network config
14 . /etc/sysconfig/network
15
16 # Check that networking is up
17 if is_no "${NETWORKING}"; then
18     msg_network_down update
19     exit 1
20 fi
21
22 case "$1" in
23     start)
24         # Check if the service is already running?
25         if [ -f /var/lock/subsys/update ]; then
26             msg_already_running update
27         else
28             msg_starting rpc2portmap
29             daemon rpc2portmap
30             msg_starting updatesrv
31             daemon updatesrv
32             msg_starting updateclnt
33             daemon updateclnt -h `cat /var/lib/vice/db/scm`
34             RETVAL=$?
35             [ RETVAL -eq 0 ] && touch /var/lock/subsys/update
36         fi
37         ;;
38     stop)
39         if [ -f /var/lock/subsys/update ]; then
40             msg_stopping updateclnt
41             killproc updateclnt
42             msg_stopping updatesrv
43             killproc updatesrv
44             msg_stopping rpc2portmap
45             killproc rpc2portmap
46             rm -f /var/lock/subsys/update
47         else
48             msg_Not_Running update
49         fi
50         ;;
51     restart)
52         $0 stop
53         $0 start
54         ;;
55     *)
56         msg_usage "$0 {start|stop|restart}"
57         exit 1
58         ;;
59 esac
60
61 exit $RETVAL
62
This page took 0.089068 seconds and 3 git commands to generate.