]>
Commit | Line | Data |
---|---|---|
ff6cfa37 | 1 | #!@PYTHON@ |
81675874 | 2 | |
a49b5422 | 3 | import tornado.ioloop |
feb02477 | 4 | import tornado.options |
81675874 | 5 | |
026ebaef | 6 | tornado.options.define("debug", type=bool, default=False, help="Enable debug mode") |
a49b5422 | 7 | tornado.options.define("port", type=int, default=8001, help="Port to listen on") |
feb02477 | 8 | |
a95c2f97 | 9 | from ipfire.web import Application |
feb02477 | 10 | |
a49b5422 MT |
11 | def run(): |
12 | tornado.options.parse_command_line() | |
3add293a | 13 | |
a49b5422 | 14 | # Initialize application |
026ebaef MT |
15 | app = Application("@configsdir@/@PACKAGE_NAME@.conf", |
16 | debug=tornado.options.options.debug) | |
9d5826b9 | 17 | app.listen(tornado.options.options.port, xheaders=True) |
3add293a | 18 | |
a49b5422 MT |
19 | # Launch IOLoop |
20 | tornado.ioloop.IOLoop.current().start() | |
940227cb | 21 | |
a49b5422 | 22 | run() |