2f9f5fdd4a78106234214910bcdc1673b92c2670
[packages/davfs.git] / davfs.init
1 # $Revision$, $Date$
2 #!/bin/sh
3 #
4 # davfsd                davfsd (WEB-DAV Linux File System)
5 #
6 # chkconfig:    345 35 65
7 #
8 # description:  davfsd is a server part of the WEB-DAV Linux File System
9 #
10
11
12 # Source function library
13 . /etc/rc.d/init.d/functions
14
15 # Get network config
16 . /etc/sysconfig/network
17
18 # Get service config
19 [ -f /etc/sysconfig/davfsd ] && . /etc/sysconfig/davfsd
20
21 # Check that networking is up.
22 if is_no "${NETWORKING}"; then
23         msg_network_down davfsd
24         exit 1
25 fi
26
27
28 # See how we were called.
29 case "$1" in
30   start)
31         # Check if the service is already running?
32         if [ ! -f /var/lock/subsys/davfsd ]; then
33                 msg_starting davfsd
34                 daemon /usr/sbin/davfsd
35                 RETVAL=$?
36                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/davfsd
37         else
38                 msg_already_running davfsd
39                 exit 1
40         fi
41         ;;
42   stop)
43         if [ -f /var/lock/subsys/davfsd ]; then
44                 msg_stopping davfsd
45                 killproc davfsd
46                 rm -f /var/run/davfsd.pid /var/lock/subsys/davfsd >/dev/null 2>&1
47         else
48                 msg_not_running davfsd
49                 exit 1
50         fi
51         ;;
52   restart|reload)
53         $0 stop
54         $0 start
55         ;;
56   status)
57         status davfsd
58         exit $?
59         ;;
60   reload)
61         msg_reloading davfsd
62         killproc davfsd -HUP
63         ;;
64   *)
65         msg_usage "$0 {start|stop|init|restart|reload|status}"
66         exit 1
67 esac
68
69 exit $RETVAL
This page took 0.072659 seconds and 2 git commands to generate.