X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fbootscripts%2Fclamav;h=4ecc4f0b94bad36d8b03cc230de1acce3c550a11;hb=HEAD;hp=5ffe846aac9ae42068b0f9123f01f357ac682cc4;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage5/bootscripts/clamav b/stage5/bootscripts/clamav index 5ffe846..4ecc4f0 100755 --- a/stage5/bootscripts/clamav +++ b/stage5/bootscripts/clamav @@ -9,7 +9,7 @@ SOCKET_DIR="/var/run/clamav" start() { - if statusproc clamd | grep "not running" 1> /dev/null 2>&1; then + if statusproc clamd | grep -q "stopped"; then # Not taking any chances, removing left-over files rm -f ${SOCKET_DIR}/clamd.{sock,pid} || return 1 fi @@ -17,12 +17,13 @@ start() sleep 1 - if statusproc clamav-milter | grep "not running" 1> /dev/null 2>&1; then + if statusproc clamav-milter | grep -q "stopped"; then # Not taking any chances, removing left-over files rm -f ${SOCKET_DIR}/clmilter.sock || return 1 fi # Option "--postmaster-only" is to send warnings only to postmaster. - loadproc /usr/sbin/clamav-milter --local --outgoing --headers --postmaster-only ${SOCKET_DIR}/clmilter.sock + loadproc /usr/sbin/clamav-milter --local --outgoing --headers \ + --postmaster-only ${SOCKET_DIR}/clmilter.sock return $? }