#!/usr/bin/env python
#
#

import sys, os
sys.path.insert(0, os.getcwd())

try:
    from gozerbot.datadir import datadir, makedirs
    makedirs()
    from gozerbot.config import config, Config, mainconfigtxt, fleetbotconfigtxt
    config.write_init(mainconfigtxt)
    cfg = Config(datadir + os.sep + 'fleet' + os.sep + 'default', 'config', inittxt=fleetbotconfigtxt)
    cfg.save()
    cfg = Config(datadir + os.sep + 'fleet' + os.sep + 'jabber', 'config', inittxt=fleetbotconfigtxt)
    cfg['name'] = "xmpp"
    cfg['type'] = "xmpp"
    cfg['enable']= 0
    cfg.save()
except Exception, ex:
    print ex
    os._exit(1)

os._exit(0)
