konflikt o libclamav5
[clamav-cn.git] / debian / postinst
index 22416db..50a2959 100755 (executable)
@@ -3,9 +3,10 @@
 set -e
 
 [ "$1" = "configure" ] || exit 0
+[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
 
 # Load CARNet functions
-#. /usr/share/carnet-tools/functions.sh
+. /usr/share/carnet-tools/functions.sh
 
 #if dpkg --compare-versions "$2" lt 2:0.91.1-1 ; then
 #  cp_backup_conffile /etc/clamav/clamd.conf
@@ -21,6 +22,15 @@ set -e
 #  restart="yes"
 #fi
 
+cp_check_and_sed "^AllowSupplementaryGroups false" \
+                 "s/AllowSupplementaryGroups false/AllowSupplementaryGroups true/g" \
+                 /etc/clamav/clamd.conf && restart="yes" || true
+
+if ! grep -q ^AllowSupplementaryGroups /etc/clamav/clamd.conf; then
+  echo "AllowSupplementaryGroups true" >> /etc/clamav/clamd.conf
+  reload="yes"
+fi
+
 chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav
 
 # dodaj korisnika clamav u grupu amavis (ako postoji...)