]> git.pld-linux.org Git - packages/coda.git/blob - coda.update.init
- updated
[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                 exit 1
28         else
29                 msg_starting rpc2portmap
30                 daemon rpc2portmap
31                 msg_starting updatesrv
32                 daemon updatesrv
33                 msg_starting updateclnt
34                 daemon updateclnt -h `cat /var/lib/vice/db/scm`
35                 RETVAL=$?
36                 [ RETVAL -eq 0 ] && touch /var/lock/subsys/update
37         fi
38         ;;
39   stop)
40         if [ -f /var/lock/subsys/update ]; then
41                 msg_stopping updateclnt
42                 killproc updateclnt
43                 msg_stopping updatesrv
44                 killproc updatesrv
45                 msg_stopping rpc2portmap
46                 killproc rpc2portmap
47                 rm -f /var/lock/subsys/update
48         else
49                 msg_not_running update
50                 exit 1
51         fi
52         ;;
53   status)
54         ;;
55   restart|reload)
56         $0 stop
57         $0 start
58         ;;
59   *)
60         msg_usage "$0 {start|stop|restart|reload|status}"
61         exit 1
62         ;;
63 esac
64
65 exit $RETVAL
This page took 0.076929 seconds and 3 git commands to generate.