From: Ivan Rako Date: Tue, 28 Feb 2017 15:37:18 +0000 (+0100) Subject: izmjene u postinstu X-Git-Tag: debian/4%0.99.2_cn1^0 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=refs%2Fheads%2Fjessie;p=clamav-cn.git izmjene u postinstu --- diff --git a/debian/changelog b/debian/changelog index d8eef41..45354f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +clamav-cn (4:0.99.2~cn1) stable; urgency=medium + + * Provjera o postojanju direktorija prije naredbe chown u postinstu + + -- Ivan Rako Tue, 28 Feb 2017 16:37:12 +0100 + clamav-cn (4:0.99.2~cn0) stable; urgency=medium * Ovisnost o novoj verziji clamav-unofficial-sigs diff --git a/debian/postinst b/debian/postinst index bff2dbb..076fbe5 100755 --- a/debian/postinst +++ b/debian/postinst @@ -13,7 +13,17 @@ 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 +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"