start()
{
- if statusproc clamd | grep "not running" 1> /dev/null 2>&1; then
+ if statusproc clamd | grep -q "not running"; then
# Not taking any chances, removing left-over files
rm -f ${SOCKET_DIR}/clamd.{sock,pid} || return 1
fi
sleep 1
- if statusproc clamav-milter | grep "not running" 1> /dev/null 2>&1; then
+ if statusproc clamav-milter | grep -q "not running"; 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 $?
}