Blame | Last modification | View Log | RSS feed
#!/bin/sh
### A simple update script for the clamav virus database.
### This could as well be replaced by a SysV script.
### fix log file if needed
LOG_FILE="/var/log/clamav/freshclam.log"
USER=`awk '/DatabaseOwner/ {print $2}' /etc/freshclam.conf`
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 644 "$LOG_FILE"
chown $USER.$USER "$LOG_FILE"
fi
# User check event
chown -R $USER.$USER /var/clamav
/usr/bin/freshclam \
--quiet \
--datadir="/var/clamav" \
--log="$LOG_FILE" \
--daemon-notify="/etc/clamd.conf" 2>/dev/null
# Current 3rd party channel updater
#if [ -x /usr/bin/clamav_updater.sh ]; then
# /usr/bin/clamav_updater.sh >/dev/null 2>&1
#fi