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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jeremy Malcolm
  • Date: 2012-04-03 21:58:28 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120403215828-6mik0tzug5na93la
Tags: 0.99.1-2
* Removes logfiles on purge (Closes: #668767)
* Reverted location of installed files back to /usr/lib/gozerbot.

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)