Add tests for C++ compiler
[hvlinux.git] / stage5 / bootscripts / clamav
index 5ffe846..4ecc4f0 100755 (executable)
@@ -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 $?
 }