izmjene u postinstu jessie debian/4%0.99.2_cn1
authorIvan Rako <irako@nekkar.carnet.hr>
Tue, 28 Feb 2017 15:37:18 +0000 (16:37 +0100)
committerIvan Rako <irako@nekkar.carnet.hr>
Tue, 28 Feb 2017 15:37:18 +0000 (16:37 +0100)
debian/changelog
debian/postinst

index d8eef41..45354f0 100644 (file)
@@ -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 <Ivan.Rako@CARNet.hr>  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
index bff2dbb..076fbe5 100755 (executable)
@@ -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"