5 [ "$1" = "configure" ] || exit 0
6 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
8 # Load CARNet functions
9 . /usr/share/carnet-tools/functions.sh
11 #if dpkg --compare-versions "$2" lt 2:0.91.1-1 ; then
12 # cp_backup_conffile /etc/clamav/clamd.conf
13 # rm -f /etc/clamav/clamd.conf
14 # cp -a /usr/share/doc/clamav-cn/examples/clamd.conf /etc/clamav/clamd.conf
18 #if dpkg --compare-versions "$2" lt 2:0.91.1-1 ; then
19 # cp_backup_conffile /etc/clamav/freshclam.conf
20 # rm -f /etc/clamav/freshclam.conf
21 # cp -a /usr/share/doc/clamav-cn/examples/freshclam.conf /etc/clamav/freshclam.conf
25 cp_check_and_sed "^AllowSupplementaryGroups false" \
26 "s/AllowSupplementaryGroups false/AllowSupplementaryGroups true/g" \
27 /etc/clamav/clamd.conf && restart="yes" || true
29 if ! grep -q ^AllowSupplementaryGroups /etc/clamav/clamd.conf; then
30 echo "AllowSupplementaryGroups true" >> /etc/clamav/clamd.conf
34 chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav
36 # dodaj korisnika clamav u grupu amavis (ako postoji...)
37 getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"
40 [ "$restart" = "yes" ] || exit 0
41 if [ -x /usr/sbin/invoke-rc.d ]; then
42 [ -x /etc/init.d/clamav-daemon ] && invoke-rc.d clamav-daemon restart
44 [ -x /etc/init.d/clamav-daemon ] && /etc/init.d/clamav-daemon restart
47 if [ -x /usr/sbin/invoke-rc.d ]; then
48 [ -x /etc/init.d/clamav-freshclam ] && invoke-rc.d clamav-freshclam restart
50 [ -x /etc/init.d/clamav-freshclam ] && /etc/init.d/clamav-freshclam restart