]> git.pld-linux.org Git - packages/amavisd.git/blame - amavisd.init
- drop obsolete and outdated manual inclusion of rpm macros
[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
edc07c65 20RETVAL=0
019a3228 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
e0ca2d1c 30 msg_already_running Amavisd
019a3228 31 fi
32 ;;
33 stop)
34 # Stop daemons.
35 if [ -f /var/lock/subsys/amavisd ]; then
5d2f5bf9 36 msg_stopping Amavisd
019a3228 37 killproc amavisd;
38 rm -f /var/lock/subsys/amavisd >/dev/null 2>&1
39 else
e0ca2d1c 40 msg_not_running Amavisd
019a3228 41 fi
42 ;;
43 status)
44 status amavisd
edc07c65 45 exit $?
019a3228 46 ;;
edc07c65 47 restart|force-reload)
019a3228 48 $0 stop
49 $0 start
edc07c65 50 exit $?
019a3228 51 ;;
52 *)
edc07c65 53 msg_usage "$0 {start|stop|restart|force-reload|status}"
54 exit 3
019a3228 55esac
56
57exit $RETVAL
This page took 0.264966 seconds and 4 git commands to generate.