~ubuntu-branches/ubuntu/utopic/gozerbot/utopic

« back to all changes in this revision

Viewing changes to bin/gozerbot-init

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2009-09-14 09:00:29 UTC
  • mfrom: (1.1.4 upstream) (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090914090029-uval0ekt72kmklxw
Tags: 0.9.1.3-3
Changed dependency on python-setuptools to python-pkg-resources
(Closes: #546435) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
#
 
3
#
 
4
 
 
5
import sys, os
 
6
sys.path.insert(0, os.getcwd())
 
7
 
 
8
try:
 
9
    from gozerbot.datadir import datadir, makedirs
 
10
    makedirs()
 
11
    from gozerbot.config import config, Config, mainconfigtxt, fleetbotconfigtxt
 
12
    config.write_init(mainconfigtxt)
 
13
    cfg = Config(datadir + os.sep + 'fleet' + os.sep + 'default', 'config', inittxt=fleetbotconfigtxt)
 
14
    cfg.save()
 
15
    cfg = Config(datadir + os.sep + 'fleet' + os.sep + 'jabber', 'config', inittxt=fleetbotconfigtxt)
 
16
    cfg['name'] = "xmpp"
 
17
    cfg['type'] = "xmpp"
 
18
    cfg['enable']= 0
 
19
    cfg.save()
 
20
except Exception, ex:
 
21
    print ex
 
22
    os._exit(1)
 
23
 
 
24
os._exit(0)