From 379835295d41bdd567b91ac6bb0ee1444cda29aa Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Sun, 20 Feb 2011 14:35:25 +0000
Subject: [PATCH] Add creation of dir for documents

---
 build/deb/postinst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/build/deb/postinst b/build/deb/postinst
index 68a067f8cd7..f970093d172 100644
--- a/build/deb/postinst
+++ b/build/deb/postinst
@@ -49,6 +49,12 @@ case "$1" in
 			cat $fileorig | sed -e 's/__SUPERUSERLOGIN__/'$superuserlogin'/g' | sed -e 's/__SUPERUSERPASSWORD__/'$superuserpassword'/g' > $config
 		fi
 		
+        # Create /var/lib/dolibarr/documents
+        mkdir -p /var/lib/dolibarr/documents
+        chown -R www-data.www-data /var/lib/dolibarr/documents;
+        chmod -R 775 /var/lib/dolibarr/documents;
+        chmod -R g+s /var/lib/dolibarr/documents;
+
 		# Create empty conf.php
 		if [ ! -f /usr/share/dolibarr/htdocs/conf/conf.php ]
 		then 
-- 
GitLab