]> git.pld-linux.org Git - packages/davfs.git/blob - davfs.init
- fix improper usage of %%{_sysconfdir}
[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         fi
40         ;;
41   stop)
42         if [ -f /var/lock/subsys/davfsd ]; then
43                 msg_stopping davfsd
44                 killproc davfsd
45                 rm -f /var/run/davfsd.pid /var/lock/subsys/davfsd >/dev/null 2>&1
46         else
47                 msg_not_running davfsd
48                 exit 1
49         fi
50         ;;
51   restart)
52         $0 stop
53         $0 start
54         ;;
55   status)
56         status davfsd
57         exit $?
58         ;;
59   reload)
60         msg_reloading davfsd
61         killproc davfsd -HUP
62         ;;
63   *)
64         msg_usage "$0 {start|stop|init|status|restart|reload}"
65         exit 1
66 esac
67
68 exit $RETVAL
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %define date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
74 %changelog
75 * %{date} PLD Team <feedback@pld.org.pl>
76 All persons listed below can be reached at <cvs_login>@pld.org.pl
77
78 $Log$
This page took 0.036418 seconds and 3 git commands to generate.