Show
Ignore:
Timestamp:
08/10/07 15:33:42 (5 years ago)
Author:
trivoallan
Message:

cleverbox :

fixes #1

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cleverbox/trunk/cleverbox/scripts/admin.py

    r143 r147  
    903903        self._rchown( trac_attachments_path , int(self.getConfig('apache_user', 'general')), int(self.getConfig('ssh_group', 'general')) ) 
    904904 
    905         # Trac conf 
     905        # Trac conf 
    906906        trac_ini_path   = os.path.join( self.getConfig('clients_root', 'general'), 
    907907                                       infos['client'], 
     
    909909                                       infos['short_name'], 
    910910                                       'conf','trac.ini' ) 
    911         os.chmod( trac_ini_path, 0777 )  
     911        os.chmod( trac_ini_path, 0777 )  
    912912 
    913913        # Subversion repository 
     
    941941                tracproject_config.add_section(section) 
    942942            for option in tracdefaults_config.options(section): 
    943                 tracproject_config.set(section, option, tracdefaults_config.get(section, option)) 
     943                # Perform variable substituion in each default option 
     944                # It is probably not very good in term of performances, but we'll wait until someone complains to fix it 
     945                default_option = tracdefaults_config.get(section, option) % {'client_name'      : infos['client'], 
     946                                                                             'project_name'     : infos['short_name'], 
     947                                                                             'clients_root'     : self.getConfig('clients_root', 'general'), 
     948                                                                             'authbackend_pass' : self.getConfig('authbackend_pass', 'general'), 
     949                                                                             'trac_install_dir' : self.getConfig('lib_dir', 'trac'), 
     950                                                                             'domain_name'      : self.getConfig('domain', 'general')} 
     951                tracproject_config.set(section, option, default_option) 
    944952 
    945953        fp = open(project_config_path, 'w+')