nfd: Create and chown log directory only if it doesn't exist
Otherwise, any update of nfd would break nlsr daemon, which uses a
subdirectory in the same log folder, but using different user.
diff --git a/nfd/debian/nfd.postinst b/nfd/debian/nfd.postinst
index d608129..8c4c667 100644
--- a/nfd/debian/nfd.postinst
+++ b/nfd/debian/nfd.postinst
@@ -4,8 +4,11 @@
exit 0
fi
-mkdir -p /var/log/ndn
-chown -R ndn:ndn /var/log/ndn
+
+if [ ! -d /var/log/ndn ]; then
+ mkdir -p /var/log/ndn
+ chown -R ndn:ndn /var/log/ndn
+fi
if [ ! -f /etc/ndn/certs/localhost_daemons_nrd.ndncert ]; then
# Create HOME and generate self-signed NDN certificate for nfd