]> git.pld-linux.org Git - packages/am-utils.git/blob - am-utils.init
- updated
[packages/am-utils.git] / am-utils.init
1 #!/bin/sh
2 #
3 # chkconfig:    345 72 28
4 # description:  Runs the automount daemon that mounts devices and NFS hosts \
5 #               on demand.
6 # processname:  amd
7 # config:       /etc/amd.conf
8
9 # Source function library.
10 . /etc/rc.d/init.d/functions
11
12 # Demon specified configuration.
13 . /etc/sysconfig/amd
14
15 # See how we were called.
16 case "$1" in
17   start)
18         # Check if the service is already running?
19         if [ ! -f /var/lock/subsys/amd ]; then
20                 msg_starting amd
21                 daemon /usr/sbin/amd -a $ADIR -l syslog $AMDOPTS -c 1000 $MOUNTPTS
22                 touch /var/lock/subsys/amd
23         else
24                 msg_already_running Amavisd
25                 exit 1
26         fi
27         ;;
28   stop)
29         if [ -f /var/lock/subsys/amd ]; then
30                 msg_stopping amd
31                 killproc amd
32                 rm -f /var/lock/subsys/amd
33         else
34                 msg_not_running Amavisd
35                 exit 1
36         fi
37         ;;
38   status)
39         status amd
40         ;;
41   restart)
42         $0 stop
43         $0 start
44         ;;
45   reload)
46         killall -HUP amd
47         ;;
48   *)
49         msg_usage "$0 {start|stop|status|restart|reload}"
50         exit 1
51 esac
52
53 exit 0
This page took 0.091235 seconds and 4 git commands to generate.