]> git.pld-linux.org Git - packages/dspam.git/blame - dspam.init
- more fixes
[packages/dspam.git] / dspam.init
CommitLineData
5e5c286a
AM
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
5e5c286a
AM
13# Get service config
14[ -f /etc/sysconfig/dspam ] && . /etc/sysconfig/dspam
15
16RETVAL=0
17# See how we were called.
18case "$1" in
19 start)
20 # Check if the service is already running?
21 if [ ! -f /var/lock/subsys/dspam ]; then
22 msg_starting dspam
2e6afeac 23 daemon --fork --user mail /usr/bin/dspam --daemon
5e5c286a
AM
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 dspam
34 rm -f /var/run/dspam.pid /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 >&2
55 exit 7
56 fi
57 ;;
58 *)
59 msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
60 exit 3
61esac
62
63exit $RETVAL
This page took 0.062399 seconds and 4 git commands to generate.