1 #! /usr/bin/python
2 # $Id: roundup-mailgw,v 1.2 2001-07-29 07:01:39 richard Exp $
4 import sys
5 if int(sys.version[0]) < 2:
6 print "Roundup requires Python 2.0 or newer."
7 sys.exit(1)
9 # figure the instance home
10 import os
11 if len(sys.argv) > 1:
12 instance_home = sys.argv[1]
13 else:
14 instance_home = os.environ.get('ROUNDUP_INSTANCE', '')
15 if not instance_home:
16 print 'No instance home specified'
17 sys.exit(1)
19 # get the instance
20 path, instance = os.path.split(instance_home)
21 sys.path.insert(0, path)
22 instance = __import__(instance)
23 sys.path[0]
25 # invokde the mail handler
26 db = instance.open('admin')
27 handler = instance.MailGW(db)
28 handler.main(sys.stdin)
30 #
31 # $Log: not supported by cvs2svn $
32 # Revision 1.1 2001/07/23 03:46:48 richard
33 # moving the bin files to facilitate out-of-the-boxness
34 #
35 # Revision 1.1 2001/07/22 11:15:45 richard
36 # More Grande Splite stuff
37 #
38 #
39 # vim: set filetype=python ts=4 sw=4 et si