]> git.pld-linux.org Git - packages/coda.git/blob - coda.codasrv.init
- updated
[packages/coda.git] / coda.codasrv.init
1 #!/bin/sh
2 #
3 # codasrv               
4 #
5 # chkconfig:    345 96 01
6 #
7 # description:  The Coda File Server
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 codasrv
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/codasrv ]; then
26                 msg_already_running codasrv
27                 exit 1
28         else
29                 msg_starting codasrv
30                 startserver >/dev/null 2>&1 &
31                 ok
32                 RETVAL=$?
33                 [ RETVAL -eq 0 ] && touch /var/lock/subsys/codasrv
34         fi
35         ;;
36   stop)
37         if [ -f /var/lock/subsys/codasrv ]; then
38                 msg_stopping codasrv
39                 busy
40                 volutil shutdown >/dev/null 2>&1
41                 ok
42                 show "Waiting for Coda server shutdown"
43                 busy
44                 while [ -f /var/lib/vice/srv/pid ]; do
45                         sleep 1
46                 done
47                 deltext
48                 ok
49                 rm -f /var/lock/subsys/codasrv
50         else
51                 msg_not_running codasrv
52                 exit 1
53         fi
54         ;;
55   status)
56         ;;
57   restart|reload)
58         $0 stop
59         $0 start
60         ;;
61   *)
62         msg_usage "$0 {start|stop|restart|reload|status}"
63         exit 1
64         ;;
65 esac
66
67 exit $RETVAL
68
This page took 0.067795 seconds and 4 git commands to generate.