Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > b2d89f53dc70cced4e3f67fa26bbea40 > files > 13

clamav-0.95.1-2mdv2009.1.src.rpm

#!/bin/sh
#
# Startup script for the Clamav Milter Daemon
#
# chkconfig: 2345 80 30
# description: clamav-milter is a daemon which hooks into sendmail \
#              and routes email messages to clamav.
# processname: clamav-milter
# pidfile: /var/run/clamav/clamav-milter.pid
# config: /etc/sysconfig/clamav-milter

### BEGIN INIT INFO
# Provides: clamav-milter
# Should-Start: clamd
# Should-Stop: clamd
# Default-Start: 345
# Short-Description: Startup script for the Clamav Milter Daemon
# Description: clamav-milter is a daemon which hooks into sendmail \
#              and routes email messages to clamav.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

[ -x /usr/sbin/clamav-milter ] || exit 0

# Local clamav-milter config
CLAMAV_FLAGS=
test -f /etc/sysconfig/clamav-milter && . /etc/sysconfig/clamav-milter

# See how we were called.
case "$1" in
  start)
	echo -n "Starting Clamav Milter Daemon: "
        daemon clamav-milter ${CLAMAV_FLAGS}
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamav-milter
	;;
  stop)
	echo -n "Stopping Clamav Milter Daemon: "
	killproc clamav-milter
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamav-milter
	;;
  status)
	status clamav-milter
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: clamav-milter {start|stop|status|restart|reload}"
	exit 1
esac

exit $RETVAL