update_config_0.3.x-0.4.py
author Pascal Volk <neverseen@users.sourceforge.net>
Mon, 14 Apr 2008 02:21:46 +0000
changeset 16 3388b96fd3ed
parent 14 ebc9b864bc9a
child 20 55146c78b3fb
permissions -rwxr-xr-x
* 'VirtualMailManager/VirtualMailManager.py' - implemented: * VirtualMailManager.__getSalt() * VirtualMailManager.__pwCrypt() * VirtualMailManager.__pwSHA1() * VirtualMailManager.__pwMD5() * VirtualMailManager.__pwMD4() - updated VirtualMailManager.__pwhash() * 'VirtualMailManager/constants/VERSION.py' - set version to 0.4-dev * 'INSTALL' - added hint for python-crypto - updated user_query
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     1
#!/usr/bin/env python
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     2
# -*- coding: UTF-8 -*-
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     3
# Copyright 2008 VEB IT
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     4
# See COPYING for distribution information.
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     5
# $Id$
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     6
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     7
from ConfigParser import ConfigParser
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     8
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     9
cff = file('/usr/local/etc/vmm.cfg', 'r')
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    10
cf = ConfigParser()
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    11
cf.readfp(cff)
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    12
cff.close()
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    13
if not cf.has_option('misc', 'transport'):
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    14
    cff = file('/usr/local/etc/vmm.cfg', 'w')
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    15
    cf.set('misc', 'transport', 'dovecot:')
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    16
    cf.write(cff)
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    17
    cff.close()