#!/usr/bin/python
-from tornado.options import define, options, parse_command_line
-
-# Command line options
-define("debug", default=False, help="Run in debug mode", type=bool)
-parse_command_line()
-
from base import Backend
import tornado.ioloop
import tornado.options
+tornado.options.define("debug", type=bool, default=False, help="Enable debug mode")
tornado.options.define("port", type=int, default=8001, help="Port to listen on")
from ipfire.web import Application
tornado.options.parse_command_line()
# Initialize application
- app = Application("@configsdir@/@PACKAGE_NAME@.conf")
+ app = Application("@configsdir@/@PACKAGE_NAME@.conf",
+ debug=tornado.options.options.debug)
app.listen(tornado.options.options.port)
# Launch IOLoop