1
2
3
4
5
6
7
8
9
10
11
12
13 from zephir.config import *
14
15
16
17 DB_HOST = "127.0.0.1"
18 DB_USER = "zephir"
19 DB_NAME = "zephir"
20
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
29 PATH_MODULES = PATH_ZEPHIR+'modules/'
30 TEMPLATE_DIR = ROOT_DIR + 'backend/template/'
31
32
33
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
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
91 'exclude':['rapport-maj.html','blacklist-date.txt','Reconf.log']}
92 }
93