]> git.pld-linux.org Git - packages/dspam.git/blame - dspam.init
- up to 3.4.9
[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
13# Get network config
14. /etc/sysconfig/network
15
16# Get service config
17[ -f /etc/sysconfig/dspam ] && . /etc/sysconfig/dspam
18
19RETVAL=0
20# See how we were called.
21case "$1" in
22 start)
23 # Check if the service is already running?
24 if [ ! -f /var/lock/subsys/dspam ]; then
25 msg_starting dspam
26 daemon --fork /usr/bin/dspam --daemon
27 RETVAL=$?
28 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dspam
29 else
30 msg_already_running dspam
31 fi
32 ;;
33 stop)
34 if [ -f /var/lock/subsys/dspam ]; then
35 msg_stopping dspam
36 killproc dspam
37 rm -f /var/run/dspam.pid /var/lock/subsys/dspam >/dev/null 2>&1
38 else
39 msg_not_running dspam
40 fi
41 ;;
42 restart)
43 $0 stop
44 $0 start
45 exit $?
46 ;;
47 status)
48 status dspam
49 exit $?
50 ;;
51 reload|force-reload)
52 if [ -f /var/lock/subsys/dspam ]; then
53 msg_reloading dspam
54 killproc dspam -HUP
55 RETVAL=$?
56 else
57 msg_not_running dspam >&2
58 exit 7
59 fi
60 ;;
61 *)
62 msg_usage "$0 {start|stop|init|restart|reload|force-reload|status}"
63 exit 3
64esac
65
66exit $RETVAL
This page took 0.049421 seconds and 4 git commands to generate.