summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-04-30 08:29:48 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2014-04-30 08:29:48 (GMT)
commit93adca76e0855a84aa9bd998d3e7c36edbf3f44e (patch)
tree9012acafbb191d35978794b9a40299df93385753
parent68881b67f5f1269fe87fa75bd404f8bff46069e8 (diff)
downloadpfwbged.ocrloader-93adca76e0855a84aa9bd998d3e7c36edbf3f44e.zip
pfwbged.ocrloader-93adca76e0855a84aa9bd998d3e7c36edbf3f44e.tar.gz
pfwbged.ocrloader-93adca76e0855a84aa9bd998d3e7c36edbf3f44e.tar.bz2
create a second directory for every users (#4760)
-rw-r--r--generate-ldap-users.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/generate-ldap-users.py b/generate-ldap-users.py
index a24720c..d28f147 100644
--- a/generate-ldap-users.py
+++ b/generate-ldap-users.py
@@ -46,6 +46,7 @@ for user in users:
'username_lower': user.get('username').lower(),
'mail': user.get('mail'),
}
+ username = user.get('username')
vars.update(dict(cfg.items('variables')))
print >> fd, '''[ged-gen-%(mail)s]
default_type = dmsdocument
@@ -66,5 +67,9 @@ user = %(username)s
if not os.path.exists('/srv/ocr/%s' % username):
os.mkdir('/srv/ocr/%s' % username)
+ if not os.path.exists('/srv/ocr2/%s' % username):
+ os.mkdir('/srv/ocr2/%s' % username)
+
+
fd.close()