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

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


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

    Revert "Make logrotation work even when supervised"
    
    This reverts commit 15e662c42e8f9d78ad94184f9edffc5e17484f85.

diff --git a/debian/clamav-daemon.init.in b/debian/clamav-daemon.init.in
index b0f3d0f..4a49574 100644
--- a/debian/clamav-daemon.init.in
+++ b/debian/clamav-daemon.init.in
@@ -66,16 +66,14 @@ make_dir "$DataBaseDirectory"
 THEPIDFILE="`grep ^PidFile $CLAMAVCONF | awk '{print $2}'`"
 [ -n "$THEPIDFILE" ] || THEPIDFILE='/var/run/clamav/clamd.pid'
 
-if [ -f "$THEPIDFILE" ]; then
-  CLAMDPID=`pidofproc -p $THEPIDFILE $DAEMON`
-  RUNNING=$?
-else
-  CLAMDPID=`pidofproc $DAEMON`
-  RUNNING=$?
-fi
-
 if [ -z "$RUN_SUPERVISED" ]; then
-  PID="$CLAMDPID"
+  if [ -f "$THEPIDFILE" ]; then
+    PID=`pidofproc -p $THEPIDFILE $DAEMON`
+    RUNNING=$?
+  else
+    PID=`pidofproc $DAEMON`
+    RUNNING=$?
+  fi
 else
   [ -e "$SUPERVISORPIDFILE" ] && PID=`cat $SUPERVISORPIDFILE`
 fi
@@ -152,16 +150,16 @@ case "$1" in
   reload-database)
   OPTIND=1
   log_daemon_msg "Reloading database for $DESC" "$NAME"
-  if [ "$RUNNING" = 0 ] && [ -n "$CLAMDPID" ]; then
-    kill -USR2 $CLAMDPID
+  if [ "$RUNNING" = 0 ] && [ -n "$PID" ]; then
+    kill -USR2 $PID
   fi
   log_end_msg $?
   ;;
   reload-log)
   OPTIND=1
   log_daemon_msg "Reloading log file for $DESC" "$NAME"
-  if [ "$RUNNING" = 0 ] && [ -n "$CLAMDPID" ]; then
-    kill -HUP $CLAMDPID
+  if [ "$RUNNING" = 0 ] && [ -n "$PID" ]; then
+    kill -HUP $PID
   fi
   log_end_msg $?
   ;;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list