create a second directory for every users (#4760)

This commit is contained in:
Frédéric Péters 2014-04-30 10:29:48 +02:00
parent 68881b67f5
commit 93adca76e0
1 changed files with 5 additions and 0 deletions

View File

@ -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()