Commit 33a826da authored by grisel-davy's avatar grisel-davy
parents a30c778a e84b9436
......@@ -26,7 +26,7 @@ def reconfigure(api_client):
users = api_client.list("users/homecreation")
error = False
for user in users:
home = '/home-adh/{}/{}'.format(user['pseudo'][0],user['pseudo'])
uid = user['uid']
......@@ -53,7 +53,9 @@ def reconfigure(api_client):
# Simlink
link = '/home-adh/{}'.format(user['pseudo'])
if not os.path.islink(link):
os.symlink(home, link)
link2 = '{}'.format(user['pseudo'].lower())
home2 = '{}/{}'.format(user['pseudo'][0].lower(),user['pseudo'].lower())
os.symlink(home2, link2)
if not ((os.path.exists(home+'/Mail') or os.path.islink(home + '/Mail')) and (os.path.exists(home+'/OwnCloud') or os.path.islink(home + '/OwnCloud')) and os.path.islink(link)):
print('creation du home de {}'.format(user['pseudo']))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment