~ubuntu-branches/ubuntu/quantal/gozerbot/quantal

« back to all changes in this revision

Viewing changes to build/scripts-2.5/gozerbot-init

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2010-09-29 18:20:02 UTC
  • mfrom: (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100929182002-gi532gnem1vlu6jy
Tags: 0.9.1.3-5
Added python2.5 build dependency. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python2.5
 
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)