]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - www/webapp.py
Import of new website.
[people/shoehn/ipfire.org.git] / www / webapp.py
CommitLineData
81675874 1#!/usr/bin/python2.6
2
feb02477
MT
3import daemon
4import logging
5import logging.handlers
6import os
7import signal
8import sys
9
940227cb
MT
10#import tornado.httpserver
11#import tornado.ioloop
feb02477 12import tornado.options
81675874 13
14from webapp import Application
feb02477
MT
15
16tornado.options.parse_command_line()
17
81675874 18if __name__ == "__main__":
feb02477
MT
19 app = Application()
20
21 context = daemon.DaemonContext(
22 working_directory=os.getcwd(),
940227cb 23# stdout=sys.stdout, stderr=sys.stderr, # XXX causes errors...
feb02477 24 )
3add293a 25
feb02477
MT
26 context.signal_map = {
27 signal.SIGHUP : app.reload,
940227cb 28 signal.SIGTERM : app.shutdown,
feb02477 29 }
3add293a 30
940227cb
MT
31# with context:
32# app.run()
33
34 app.run()