Start before sendmail and stop after it

git-svn: trunk@841
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent eba8ebeb7c
commit a17ecfc971
  1. 5
      clamav-devel/ChangeLog
  2. 3
      clamav-devel/contrib/init/RedHat/clamav-milter
  3. 75
      clamav-devel/contrib/init/RedHat/clamd

@ -1,3 +1,8 @@
Wed Sep 8 21:47:09 BST 2004 (njh)
----------------------------------
* contrib/init/RedHat: Start clamav before sendmail and shut it down
afterwards
Wed Sep 8 17:05:08 BST 2004 (njh)
----------------------------------
* libclamav/untar.c: Fix file descriptor leak when reading a corrupt tar file

@ -2,11 +2,12 @@
#
# clamav-milter This script starts and stops the clamav-milter daemon
#
# chkconfig: 2345 91 30
# chkconfig: 2345 71 40
#
# description: clamav-milter is a daemon which hooks into sendmail and routes
# email messages to clamav
# processname: clamav-milter
# pidfile: /var/lock/subsys/clamav-milter
# Source function library.
. /etc/rc.d/init.d/functions

@ -2,8 +2,8 @@
#
# crond Start/Stop the clam antivirus daemon.
#
# chkconfig: 2345 90 60
# description: clamd is a standard UNIX program that scans for Viruses.
# chkconfig: 2345 70 41
# description: clamd is a standard Linux/UNIX program that scans for Viruses.
# processname: clamd
# config: /usr/local/etc/clamd.conf
# pidfile: /var/lock/subsys/clamd
@ -20,66 +20,67 @@ progdir="/usr/local/sbin"
# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
. /etc/sysconfig/$prog
fi
start() {
echo -n $"Starting $prog: "
daemon $progdir/$prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
return $RETVAL
echo -n $"Starting $prog: "
daemon $progdir/$prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
return $RETVAL
echo -n $"Stopping $prog: "
# Would be better to send QUIT first, then killproc if that fails
killproc $prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
return $RETVAL
}
rhstatus() {
status clamd
status clamd
}
restart() {
stop
start
stop
start
}
reload() {
echo -n $"Reloading clam daemon configuration: "
killproc clamd -HUP
retval=$?
echo
return $RETVAL
echo -n $"Reloading clam daemon configuration: "
killproc clamd -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
start
;;
stop)
stop
;;
stop
;;
restart)
restart
;;
restart
;;
reload)
reload
;;
reload
;;
status)
rhstatus
;;
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/clamd ] && restart || :
;;
[ -f /var/lock/subsys/clamd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
exit $?

Loading…
Cancel
Save