izmjene za novi clamav-unofficial-sigs
[clamav-cn.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 [ "$1" = "configure" ] || exit 0
6 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx
7
8 # Load CARNet functions
9 . /usr/share/carnet-tools/functions.sh
10
11 # obsolete option
12 cp_check_and_sed "^AllowSupplementaryGroups" \
13                  "s/^AllowSupplementaryGroups/#AllowSupplementaryGroups/g" \
14                  /etc/clamav/clamd.conf && restart="yes" || true
15
16 chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav
17
18 # dodaj korisnika clamav u grupu amavis (ako postoji...)
19 getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"
20
21 # restart if needed
22 [ "$restart" = "yes" ] || exit 0
23 service clamav-daemon restart
24 service clamav-freshclam restart
25
26 #DEBHELPER#