I have found another smarter solution.
Very simply, sequence should reverted.
Instead of starting freshclamav in daemon mode and then clamav:
Code:
${zimbra_home}/clamav/bin/freshclam \
--config-file=${zimbra_home}/conf/freshclam.conf -d --checks=12 \
>> ${zimbra_log_directory}/freshclam.log 2>&1 &
echo -n "Starting clamd..."
${zimbra_home}/clamav/sbin/clamd \
--config-file=${zimbra_home}/conf/clamd.conf \
>> ${zimbra_log_directory}/clamd.log 2>&1 & clamad should started before freshclam:
Code:
echo -n "Starting clamd..."
${zimbra_home}/clamav/sbin/clamd \
--config-file=${zimbra_home}/conf/clamd.conf \
>> ${zimbra_log_directory}/clamd.log 2>&1 &
${zimbra_home}/clamav/bin/freshclam \
--config-file=${zimbra_home}/conf/freshclam.conf -d --checks=12 \
>> ${zimbra_log_directory}/freshclam.log 2>&1 &
this way clamd starts always with a consistent daily.cvd, then freshclam is started and, when it finish to refresh db, if daily.cvd was really refreshed, it will notify clamd to reload itself:
~/conf/freshclam.conf
Code:
# Send the RELOAD command to clamd.
# Default: no
NotifyClamd /opt/zimbra/conf/clamd.conf
i will file an RFE