]> git.pld-linux.org Git - packages/amavisd.git/blame - amavisd.init
f8823fa5b3a11e7c7067e65660e274f9 amavisd-snapshot-20020300.tar.gz
[packages/amavisd.git] / amavisd.init
CommitLineData
019a3228 1#!/bin/sh
2#
3# amavisd Start/Stop the amavisd daemon.
4#
5# chkconfig: 345 40 60
6#
7# description: amavisd is daemonized antivirus daemon
8#
9# processname: amavisd
10# config: /etc/amavisd.conf
11# pidfile: /var/lock/subsys/amavisd
12
13
14# Source function library
15. /etc/rc.d/init.d/functions
16
17# Get service config
18[ -f /etc/sysconfig/amavisd ] && . /etc/sysconfig/amavisd
19
20
21# See how we were called.
22case "$1" in
23 start)
24 # Check if the service is already running?
25 if [ ! -f /var/lock/subsys/amavisd ]; then
26 msg_starting Amavisd
0f1e8f03 27 daemon 'su -s /bin/sh amavis -c "/bin/nice /usr/sbin/amavisd"'
019a3228 28 touch /var/lock/subsys/amavisd
29 else
30 msg_Already_Running Amavisd
31 exit 1
32 fi
33 ;;
34 stop)
35 # Stop daemons.
36 if [ -f /var/lock/subsys/amavisd ]; then
37 msg_stopping Amavisd
38 killproc amavisd;
39 rm -f /var/lock/subsys/amavisd >/dev/null 2>&1
40 else
41 msg_Not_Running Amavisd
42 exit 1
43 fi
44 ;;
45 status)
46 status amavisd
47 ;;
48 restart)
49 $0 stop
50 $0 start
51 ;;
52 *)
08489019 53 msg_usage "$0 {start|stop|status|restart}"
019a3228 54 exit 1
55esac
56
57exit $RETVAL
This page took 0.514341 seconds and 4 git commands to generate.