]> git.ipfire.org Git - people/jschlag/pbs.git/blob - src/scripts/pakfire-web
Use autotools
[people/jschlag/pbs.git] / src / scripts / pakfire-web
1 #!/usr/bin/python
2
3 import daemon
4 import os
5 import signal
6 import sys
7
8 import tornado.options
9
10 from web import Application
11
12
13 #tornado.options.parse_command_line()
14
15 if __name__ == "__main__":
16 app = Application()
17
18 context = daemon.DaemonContext(
19 working_directory=os.getcwd(),
20 # stdout=sys.stdout, stderr=sys.stderr, # XXX causes errors...
21 )
22
23 context.signal_map = {
24 signal.SIGHUP : app.reload,
25 signal.SIGTERM : app.shutdown,
26 }
27
28 # with context:
29 # app.run()
30
31 app.run()