[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa

Stephen Gran steve at lobefin.net
Thu Sep 4 12:36:52 UTC 2008


The following commit has been merged in the debian/unstable branch:
commit 16e638db6fd2b2d285a2b13c6a9729d5a44373d2
Author: Stephen Gran <steve at lobefin.net>
Date:   Thu Sep 4 13:25:30 2008 +0100

    Revert "merge r3846 and r3847 from trunk, for bb #823 and partly for #994"
    
    This reverts commit 12ce481f3d78662d189d53427acf49971f31aae3.

diff --git a/contrib/init/RedHat/clamav-milter b/contrib/init/RedHat/clamav-milter
index 18bf5bf..93121ed 100755
--- a/contrib/init/RedHat/clamav-milter
+++ b/contrib/init/RedHat/clamav-milter
@@ -27,45 +27,28 @@ PATH=$PATH:/usr/bin:/usr/local/sbin:/usr/local/bin
 
 RETVAL=0
 
-# Clamav-milter must have write access to the pid file, /var/run is not suitable
-default_pidfile=
-[ -d /var/run/clamav-milter ] && default_pidfile=/var/run/clamav-milter/clamav-milter.pid
-[ -d /var/clamav ] && default_pidfile=/var/clamav/clamav-milter.pid
-pidfile=${PIDFILE:-$default_pidfile}
-
-lockfile=/var/lock/subsys/clamav-milter
-
 start() {
         echo -n "Starting clamav-milter: "
-	# Don't allow files larger than 25M to be created, to limit DoS
-	# Needs to be large enough to extract the signature files
-	ulimit -f 25600
-	if [ ! -z $pidfile ]; then
-		CLAMAV_PID=--pidfile=${pidfile}
-		PID=`pidofproc -p ${pidfile} clamav-milter`
-	else
-		CLAMAV_PID=
-		PID=`pidofproc clamav-milter`
+	if test -f /var/lock/subsys/clamav-milter; then
+		echo " already running!"
+		return 1
 	fi
-	[ -n "$PID" ] && echo " already running!" && return 1
-        LANG= daemon clamav-milter $CLAMAV_PID ${CLAMAV_FLAGS}
+	# Don't allow files larger than 20M to be created, to limit DoS
+	# Needs to be large enough to extract the signature files
+	ulimit -f 20000
+        LANG= daemon clamav-milter ${CLAMAV_FLAGS}
         RETVAL=$?
-	[ ! -z $pidfile -a -f $pidfile ] && sed -i -e 's/-//' $pidfile
         echo
-	test $RETVAL -eq 0 && touch ${lockfile}
+	test $RETVAL -eq 0 && touch /var/lock/subsys/clamav-milter
 	return $RETVAL
 }
 
 stop() {
         echo -n "Shutting down clamav-milter: "
-	if [ ! -z $pidfile ]; then
-	        killproc -p ${pidfile} clamav-milter
-	else
-		killproc clamav-milter
-	fi
+        killproc clamav-milter
         RETVAL=$?
         echo
-	test $RETVAL -eq 0 && rm -f ${lockfile} ${pidfile}
+	test $RETVAL -eq 0 && rm -f /var/lock/subsys/clamav-milter
 }
 
 restart() {
@@ -87,14 +70,10 @@ case "$1" in
 	restart
         ;;
   condrestart)
-	test -f ${lockfile} && $0 restart || :
+	test -f /var/lock/subsys/clamav-milter && $0 restart || :
         ;;
   status)
-	if [ ! -z $pidfile ]; then
-	        status -p ${pidfile} clamav-milter
-	else
-		status clamav-milter
-	fi
+        status clamav-milter
         ;;
   *)
         echo "Usage: $0 {start|stop|reload|restart|condrestart|status}"

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list