5 [ "$1" = "configure" ] || exit 0
6 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
8 # Load CARNet functions
9 . /usr/share/carnet-tools/functions.sh
11 cp_check_and_sed "^AllowSupplementaryGroups false" \
12 "s/AllowSupplementaryGroups false/AllowSupplementaryGroups true/g" \
13 /etc/clamav/clamd.conf && restart="yes" || true
15 if ! grep -q ^AllowSupplementaryGroups /etc/clamav/clamd.conf; then
16 echo "AllowSupplementaryGroups true" >> /etc/clamav/clamd.conf
20 chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav
22 # dodaj korisnika clamav u grupu amavis (ako postoji...)
23 getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"
25 # ispravi opciju od clamscana u amavis konfi
26 # --disable-summary -> --no-summary
27 if [ -f /etc/amavis/conf.d/15-av_scanners ]; then
28 cp_check_and_sed "\-\-disable-summary" \
29 "s/--disable-summary/--no-summary/g" \
30 /etc/amavis/conf.d/15-av_scanners && restart_amavis="yes" || true
32 if [ -f /etc/amavis/conf.d/15-av_scanners.cn-old ]; then
33 rm -f /etc/amavis/conf.d/15-av_scanners.cn-old
38 if ! grep -q "^unset msrbl_dbs" /etc/clamav-unofficial-sigs.conf; then
39 echo "unset msrbl_dbs" >> /etc/clamav-unofficial-sigs.conf
42 if [ "$restart_amavis" = "yes" ]; then
43 if [ -x /usr/sbin/invoke-rc.d ]; then
44 [ -x /etc/init.d/amavisd-cn ] && invoke-rc.d amavisd-cn restart
46 [ -x /etc/init.d/amavisd-cn ] && /etc/init.d/amavisd-cn restart
48 # nije potreban restart clamava
53 [ "$restart" = "yes" ] || exit 0
54 service clamav-daemon restart
55 service clamav-freshclam restart