]> git.pld-linux.org Git - packages/dspam.git/blob - dspam.init
- Obsoletes for dropped -driver-db
[packages/dspam.git] / dspam.init
1 #!/bin/sh
2 #
3 # dspam         dspam
4 #
5 # chkconfig:    345 55 45
6 #
7 # description:  dspam
8
9
10 # Source function library
11 . /etc/rc.d/init.d/functions
12
13 # Get service config
14 [ -f /etc/sysconfig/dspam ] && . /etc/sysconfig/dspam
15
16 RETVAL=0
17 # See how we were called.
18 case "$1" in
19   start)
20         # Check if the service is already running?
21         if [ ! -f /var/lock/subsys/dspam ]; then
22                 msg_starting dspam
23                 daemon --fork --user mail /usr/bin/dspam --daemon
24                 RETVAL=$?
25                 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dspam
26         else
27                 msg_already_running dspam
28         fi
29         ;;
30   stop)
31         if [ -f /var/lock/subsys/dspam ]; then
32                 msg_stopping dspam
33                 killproc --pidfile dspam/dspam.pid dspam
34                 rm -f /var/lock/subsys/dspam >/dev/null 2>&1
35         else
36                 msg_not_running dspam
37         fi
38         ;;
39   restart)
40         $0 stop
41         $0 start
42         exit $?
43         ;;
44   status)
45         status dspam
46         exit $?
47         ;;
48   reload|force-reload)
49         if [ -f /var/lock/subsys/dspam ]; then
50                 msg_reloading dspam
51                 killproc dspam -HUP
52                 RETVAL=$?
53         else
54                 msg_not_running dspam
55                 exit 7
56         fi
57         ;;
58   *)
59         msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
60         exit 3
61 esac
62
63 exit $RETVAL
This page took 0.065954 seconds and 3 git commands to generate.