X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=clamav-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=a92f09d469abb426f65d345023ea94e723cfbdd6;hp=bff2dbb451aabe22d4b3f087772029d839580bfd;hb=HEAD;hpb=f1c24e07b91f6827b6386b3ab53fab882c5f0d0e;ds=sidebyside diff --git a/debian/postinst b/debian/postinst index bff2dbb..a92f09d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -5,7 +5,7 @@ set -e [ "$1" = "configure" ] || exit 0 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx -# Load CARNet functions +# Load CARNET Tools . /usr/share/carnet-tools/functions.sh # obsolete option @@ -13,7 +13,35 @@ cp_check_and_sed "^AllowSupplementaryGroups" \ "s/^AllowSupplementaryGroups/#AllowSupplementaryGroups/g" \ /etc/clamav/clamd.conf && restart="yes" || true -chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav +# obsolete option SafeBrowsing https://blog.clamav.net/2021/04/clamav-01032-security-patch-release.html +cp_check_and_sed "^SafeBrowsing" \ + "s/^SafeBrowsing/#SafeBrowsing/g" \ + /etc/clamav/freshclam.conf && restart="yes" || true + +# dodaj staru opciju PidFIle kako bi monit pouzdano radio +cp_check_and_sed "^#PidFile" \ + "s,^#PidFile /var/run/clamav/clamd.pid,PidFile /var/run/clamav/clamd.pid,g" \ + /etc/clamav/clamd.conf && restart="yes" || true +# za svaki slučaj ako je neka druga putanja +cp_check_and_sed "^PidFile" \ + "s,^PidFile.*,PidFile /var/run/clamav/clamd.pid,g" \ + /etc/clamav/clamd.conf && restart="yes" || true + +if [ -d /var/run/clamav ]; then + chown -R clamav:clamav /var/run/clamav +fi + +if [ -d /run/clamav ]; then + chown -R clamav:clamav /run/clamav +fi + +if [ -d /var/lib/clamav ]; then + chown -R clamav:clamav /var/lib/clamav +fi + +if [ -d /var/log/clamav ]; then + chown -R clamav:clamav /var/log/clamav +fi # dodaj korisnika clamav u grupu amavis (ako postoji...) getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes"