From be24feee86bdda7e2779c891f57dc8e6c4babe8f Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Tue, 28 Feb 2017 16:37:18 +0100 Subject: [PATCH] izmjene u postinstu --- debian/changelog | 6 ++++++ debian/postinst | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) 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" -- 1.7.10.4