Skip to content

Commit

Permalink
quickstart option added
Browse files Browse the repository at this point in the history
git-svn-id: http://orbited.org/svn/orbited/trunk@604 fe34127c-c842-0410-aa83-9fc675b9a81c
  • Loading branch information
mario committed Apr 9, 2009
1 parent 8d957f2 commit e2942dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
1 change: 0 additions & 1 deletion daemon/orbited/config.py
Expand Up @@ -4,7 +4,6 @@
map = {
'[global]': {
'proxy.enabled': '1',
'pid.location': '/tmp/orbited.pid',
'session.ping_interval': '30',
'session.ping_timeout': '30'
},
Expand Down
28 changes: 21 additions & 7 deletions daemon/orbited/start.py
Expand Up @@ -38,7 +38,6 @@ def _setup_static(root, config):
def main():
from optparse import OptionParser
parser = OptionParser()
# TODO: this should be in start.py, not here.
parser.add_option(
"-c",
"--config",
Expand All @@ -62,15 +61,30 @@ def main():
default=False,
help="run Orbited with a profiler"
)

(options, args) = parser.parse_args(sys.argv)

parser.add_option(
"-q",
"--quickstart",
dest="quickstart",
action="store_true",
default=False,
help="run Orbited on port 8000 and MorbidQ on port 61613"
)

(options, args) = parser.parse_args()

if options.version:
print "Orbited version: %s" % (version,)
sys.exit(0)
# load configuration from configuration file and from command
# line arguments.
config.setup(options=options)

if options.quickstart:
config.map['[listen]'].append('http://:8000')
config.map['[listen]'].append('stomp://:61613')
config.map['[access]'][('localhost',61613)] = ['*']
print "Quickstarting Orbited"
else:
# load configuration from configuration
# file and from command line arguments.
config.setup(options=options)

logging.setup(config.map)

Expand Down

0 comments on commit e2942dc

Please sign in to comment.