Package zephir :: Package backend :: Module config
[hide private]
[frames] | no frames]

Source Code for Module zephir.backend.config

 1  # -*- coding: UTF-8 -*- 
 2  ########################################################################### 
 3  # Eole NG - 2007   
 4  # Copyright Pole de Competence Eole  (Ministere Education - Academie Dijon) 
 5  # Licence CeCill  cf /root/LicenceEole.txt 
 6  # eole@ac-dijon.fr  
 7  #   
 8  # config.py 
 9  #   
10  # fichier de configuration du backend zephir 
11  #        
12  ########################################################################### 
13  from zephir.config import * 
14   
15  # paramètres de connexion à la base postgresql 
16   
17  DB_HOST = "127.0.0.1" 
18  DB_USER = "zephir" 
19  DB_NAME = "zephir" 
20  # récupération du mdp postgresql pour zephir (possible seulement pour root) 
21  f_pwd = '/usr/share/zephir/utils/conf_db' 
22  try: 
23      execfile(f_pwd) 
24      assert DB_PASSWD 
25  except: 
26      DB_PASSWD = "" 
27   
28  # paths  
29  PATH_MODULES = PATH_ZEPHIR+'modules/' 
30  TEMPLATE_DIR = ROOT_DIR + 'backend/template/' 
31   
32  # fonctions utiles 
33   
34 -def u(objet):
35 if type(objet) == list: 36 l = [] 37 for item in objet: 38 l.append(u(item)) 39 return l 40 if type(objet) == tuple: 41 l = [] 42 for item in objet: 43 l.append(u(item)) 44 return l 45 if type(objet) == dict: 46 dico={} 47 for cle in objet.keys(): 48 dico[cle] = u(objet[cle]) 49 return dico 50 if type(objet) == str: 51 try: 52 string = unicode(objet,charset) 53 except: 54 string = unicode(objet,'ISO-8859-1').encode(charset) 55 return string 56 return objet
57 58 # template de configuration uucp pour un serveur 59 60 CONFIG_UUCP="""# configuration du serveur %s 61 system %s 62 call-login %s 63 call-password %s 64 time any 65 port tcp 66 pubdir /var/spool/uucppublic 67 protocol-parameter g timeout 20 68 protocol-parameter g retries 10 69 remote-send ~ 70 remote-receive ~ 71 local-receive ~ 72 local-send / 73 """ 74 75 migration_files = {'amon-2.0':{'files':[ 76 ('filtres-users','filtres-users',True), 77 ('serialize_btn.srz','serialize_btn.srz',False), 78 ('local','local',False), 79 ('perso','perso',False), 80 ('tmp','tmp',True), 81 ('horaires.txt','tmp/horaires.txt',True)], 82 'rights':[('filtres-users','','www-data','www-data','0644'), 83 ('local','-R','www-data','proxy','0755'), 84 ('local/*','','www-data','proxy','0644'), 85 ('local/liste_blanche','-R','www-data','proxy','0755'), 86 ('local/liste_blanche/*','','www-data','proxy','0644'), 87 ('tmp','','www-data','www-data','0777'), 88 ('tmp/*','','www-data','www-data','0644'), 89 ('serialize_btn.srz','','www-data','www-data','0644')], 90 #('perso','','www-data','www-data','0644')]} ?? 91 'exclude':['rapport-maj.html','blacklist-date.txt','Reconf.log']} 92 } 93