]> git.pld-linux.org Git - packages/coda.git/blame - coda.update.init
- updated
[packages/coda.git] / coda.update.init
CommitLineData
bf7542bc 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
17if is_no "${NETWORKING}"; then
a61a406d 18 msg_network_down update
19 exit 1
bf7542bc 20fi
21
22case "$1" in
a61a406d 23 start)
24 # Check if the service is already running?
bf7542bc 25 if [ -f /var/lock/subsys/update ]; then
a61a406d 26 msg_already_running update
27 exit 1
bf7542bc 28 else
a61a406d 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
bf7542bc 37 fi
a61a406d 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
bf7542bc 48 else
a61a406d 49 msg_not_running update
50 exit 1
bf7542bc 51 fi
a61a406d 52 ;;
53 status)
54 ;;
55 restart|reload)
56 $0 stop
bf7542bc 57 $0 start
a61a406d 58 ;;
59 *)
60 msg_usage "$0 {start|stop|restart|reload|status}"
bf7542bc 61 exit 1
62 ;;
63esac
64
65exit $RETVAL
This page took 0.084237 seconds and 4 git commands to generate.