]> git.pld-linux.org Git - packages/coda.git/blame - coda.codasrv.init
- dropped pre-cvs changelog
[packages/coda.git] / coda.codasrv.init
CommitLineData
bf7542bc 1#!/bin/sh
2#
b0300ebb 3# codasrv
bf7542bc 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
fde3a400 17if is_yes "${NETWORKING}"; then
21f06a93 18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
fde3a400 19 msg_network_down codasrv
20 exit 1
21 fi
22else
23 exit 0
bf7542bc 24fi
25
5a8a8a34 26RETVAL=0
bf7542bc 27case "$1" in
a61a406d 28 start)
29 # Check if the service is already running?
5a8a8a34 30 if [ ! -f /var/lock/subsys/codasrv ]; then
a61a406d 31 msg_starting codasrv
32 startserver >/dev/null 2>&1 &
a61a406d 33 RETVAL=$?
5a8a8a34 34 ok
a61a406d 35 [ RETVAL -eq 0 ] && touch /var/lock/subsys/codasrv
5a8a8a34 36 else
37 msg_already_running codasrv
bf7542bc 38 fi
a61a406d 39 ;;
40 stop)
41 if [ -f /var/lock/subsys/codasrv ]; then
42 msg_stopping codasrv
43 busy
44 volutil shutdown >/dev/null 2>&1
45 ok
46 show "Waiting for Coda server shutdown"
47 busy
48 while [ -f /var/lib/vice/srv/pid ]; do
49 sleep 1
50 done
a61a406d 51 ok
52 rm -f /var/lock/subsys/codasrv
bf7542bc 53 else
a61a406d 54 msg_not_running codasrv
bf7542bc 55 fi
a61a406d 56 ;;
57 status)
58 ;;
5a8a8a34 59 restart|force-reload)
a61a406d 60 $0 stop
bf7542bc 61 $0 start
5a8a8a34 62 exit $?
a61a406d 63 ;;
64 *)
5a8a8a34 65 msg_usage "$0 {start|stop|restart|force-reload|status}"
66 exit 3
bf7542bc 67 ;;
68esac
69
70exit $RETVAL
This page took 0.06764 seconds and 4 git commands to generate.