]> git.pld-linux.org Git - packages/amavisd.git/blame - amavisd.init
- adapterized.
[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
2d3c11c0 27 daemon 'su -s /bin/bash amavis -c "/usr/sbin/amavisd"'
019a3228 28 chmod a+w /var/run/amavisd/amavisd.sock
29 touch /var/lock/subsys/amavisd
30 else
31 msg_Already_Running Amavisd
32 exit 1
33 fi
34 ;;
35 stop)
36 # Stop daemons.
37 if [ -f /var/lock/subsys/amavisd ]; then
38 msg_stopping Amavisd
39 killproc amavisd;
40 rm -f /var/lock/subsys/amavisd >/dev/null 2>&1
41 else
42 msg_Not_Running Amavisd
43 exit 1
44 fi
45 ;;
46 status)
47 status amavisd
48 ;;
49 restart)
50 $0 stop
51 $0 start
52 ;;
53 *)
54 msg_Usage: "$0 {start|stop|status|restart}"
55 exit 1
56esac
57
58exit $RETVAL
This page took 0.035886 seconds and 4 git commands to generate.