/usr/scripts sans / final
This commit is contained in:
parent
650f55e7e8
commit
ebeab8a0a0
8 changed files with 23 additions and 28 deletions
|
@ -1,15 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
#!/bin/bash /usr/scripts/python.sh
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys,os,hashlib
|
||||
# The fuck is happening here ?
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
sys.path.append('/usr/scripts/')
|
||||
|
||||
import lc_ldap.shortcuts
|
||||
from asterisk_reload_conf import reload_config
|
||||
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
|
||||
def gen_multidial(name, entensions):
|
||||
dial="""
|
||||
|
@ -24,6 +20,7 @@ exten => %(name)s,n,Hangup()
|
|||
return dial
|
||||
|
||||
if __name__ == '__main__' :
|
||||
conn=lc_ldap.shortcuts.lc_ldap_admin()
|
||||
multidial=""
|
||||
for droit in ['nounou', 'bureau', 'cableur', 'imprimeur']:
|
||||
multidial+=gen_multidial(droit, (adh['aid'][0].value for adh in conn.search(u'(&(droits=%s)(!(chbre=EXT)))' % droit)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue