Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > by-pkgid > 6ed1def382fa6220e1dcb1d527fa9c02 > files > 46

clamav-0.100.2-1.mga7.x86_64.rpm

#!/bin/sh
#
# The "temporary" qmail+qmail-scanner HOWTO
# -----------------------------------------
#
# For some unknown and undocumented reason clamdscan stopped working
# in the excellent qmail+qmail-scanner setup somewhere after the
# 20040103 CVS snapshot.
#
# To get it working again everything assigned to the clamav user has
# to be changed to the qscand user by hand.
#
# Hint: Change the config and chown the directories like this:
# (if you are lazy you could just execute this file)

perl -pi -e "s|clamav clamav|qscand qscand|g" /etc/logrotate.d/clamd
perl -pi -e "s|clamav clamav|qscand qscand|g" /etc/logrotate.d/freshclam
perl -pi -e "s|^User clamav|User qscand|g" /etc/clamd.conf
perl -pi -e "s|^DatabaseOwner clamav|DatabaseOwner qscand|g" /etc/freshclam.conf

chown -R qscand:qscand /var/lib/clamav
chown -R qscand:qscand /var/log/clamav
chown -R qscand:qscand /var/run/clamav

if [ -x /etc/rc.d/init.d/clamd ]; then
    /etc/rc.d/init.d/clamd restart
fi

if [ -x /etc/rc.d/init.d/freshclam ]; then
    /etc/rc.d/init.d/freshclam restart
fi

# Regards // Oden Eriksson