comparison MoinMoin/script/server/standalone.py @ 4261:6de8b4205754

Moved serving-related code into MoinMoin.web.serving module
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sat, 02 Aug 2008 21:37:30 +0200
parents c2ee4633b9e8
children ba0daaf24d63
comparison
equal deleted inserted replaced
4260:f70003d57e47 4261:6de8b4205754
11 import signal 11 import signal
12 12
13 from MoinMoin.script import MoinScript 13 from MoinMoin.script import MoinScript
14 from MoinMoin.server.server_standalone import StandaloneConfig 14 from MoinMoin.server.server_standalone import StandaloneConfig
15 from MoinMoin.server.daemon import Daemon 15 from MoinMoin.server.daemon import Daemon
16 from MoinMoin.wsgiapp import run_server 16 from MoinMoin.web.serving import run_server
17 17
18 class PluginScript(MoinScript): 18 class PluginScript(MoinScript):
19 def __init__(self, argv, def_values): 19 def __init__(self, argv, def_values):
20 MoinScript.__init__(self, argv, def_values) 20 MoinScript.__init__(self, argv, def_values)
21 self.parser.add_option( 21 self.parser.add_option(
116 116
117 if self.options.start: 117 if self.options.start:
118 daemon = Daemon('moin', pidfile, run_server, Config) 118 daemon = Daemon('moin', pidfile, run_server, Config)
119 daemon.do_start() 119 daemon.do_start()
120 else: 120 else:
121 run_server(Config) 121 run_server(Config.interface, Config.port, Config.docs,
122 use_debugger=Config.debug)
122 123
123 class DefaultConfig(StandaloneConfig): 124 class DefaultConfig(StandaloneConfig):
124 docs = os.path.join('wiki', 'htdocs') 125 docs = os.path.join('wiki', 'htdocs')
125 if not os.path.exists(docs): 126 if not os.path.exists(docs):
126 docs = "/usr/share/moin/htdocs" 127 docs = "/usr/share/moin/htdocs"