[clamav-users] No return value from clamd

emninger at riseup.net emninger at riseup.net
Sun Jan 4 07:55:23 UTC 2015


In slackware 14.1 i'm starting clamav as a service on boot. Doing so, i
get the following error msg:

-------
    Timeout reached while waiting for return value
    Could not receive return value from daemon process
-------

which makes the boot really slow (sometimes starting X even hangs!).

rc.clamav in /etc/rc.d looks like this:

------
#!/bin/sh
# Start/stop/restart clamav.
# $Id: rc.clamav,v 1.1 2007/02/14 10:29:03 root Exp root $
# Author: Eric Hameleers <alien at slackware.com>
#
---------------------------------------------------------------------------
# Slightly modified by Robby Workman <rworkman at slackbuilds.org> # to
replace backticks ( s/`command`/$(command)/ )

# Set to '1' if you want milter support:
MILTER=0

# Start clamav:
clamav_start() {
  if [ -x /usr/sbin/clamd ]; then
    echo -n "Starting clamd daemon:  /usr/sbin/clamd "
    mkdir -p /var/run/clamav/
    chown clamav:clamav /var/run/clamav/
    chmod 771 /var/run/clamav/
    /usr/sbin/clamd
    echo "."
    # Give clamd a chance to create the socket
    sleep 1
    echo -n "Starting freshclam daemon:  /usr/bin/freshclam -d
-l /var/log/clamav/freshclam.log " /usr/bin/freshclam -d
-l /var/log/clamav/freshclam.log echo "."
    if [ "$MILTER" == "1" ]; then
      echo -n "Starting clamav-milter daemon:  /usr/sbin/clamav-milter
-dblo --max-children=2 local:/var/run/clamav/clmilter.sock
" /usr/sbin/clamav-milter -dblo --max-children=2
local:/var/run/clamav/clmilter.sock echo "." fi
  fi
}

# Stop clamav:
clamav_stop() {
  kill $(cat /var/run/clamav/clamd.pid)
  #killall freshclam
  kill $(cat /var/run/clamav/freshclam.pid)
  [ "$MILTER" == "1" ] && killall clamav-milter
}

# Restart clamav:
clamav_restart() {
  clamav_stop
  sleep 1
  clamav_start
}

case "$1" in
'start')
  clamav_start
  ;;
'stop')
  clamav_stop
  ;;
'restart')
  clamav_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
--------

Curiously when i kill clamav and restart by

'service start clamav' 

apparently all is fine.

Anyone out there who has an idea?

TIA!



More information about the clamav-users mailing list