update_config_0.3.x-0.4.py
changeset 14 ebc9b864bc9a
child 20 55146c78b3fb
equal deleted inserted replaced
13:1d9bf63a86f7 14:ebc9b864bc9a
       
     1 #!/usr/bin/env python
       
     2 # -*- coding: UTF-8 -*-
       
     3 # Copyright 2008 VEB IT
       
     4 # See COPYING for distribution information.
       
     5 # $Id$
       
     6 
       
     7 from ConfigParser import ConfigParser
       
     8 
       
     9 cff = file('/usr/local/etc/vmm.cfg', 'r')
       
    10 cf = ConfigParser()
       
    11 cf.readfp(cff)
       
    12 cff.close()
       
    13 if not cf.has_option('misc', 'transport'):
       
    14     cff = file('/usr/local/etc/vmm.cfg', 'w')
       
    15     cf.set('misc', 'transport', 'dovecot:')
       
    16     cf.write(cff)
       
    17     cff.close()