3
mointwisted - control MoinMoin Twisted server
5
@copyright: 2004-2005 Thomas Waldmann, Nir Soffer
6
@license: GNU GPL, see COPYING for details.
11
# a) Configuration of Python's code search path
12
# If you already have set up the PYTHONPATH environment variable for the
13
# stuff you see below, you don't need to do a1) and a2).
15
# a1) Path of the directory where the MoinMoin code package is located.
16
# Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
17
#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
19
# a2) Path of the directory where mointwisted.py is located.
20
#sys.path.insert(0, '/path/to/mointwisted')
22
# b) Configuration of moin's logging
23
# If you have set up MOINLOGGINGCONF environment variable, you don't need this!
24
# You also don't need this if you are happy with the builtin defaults.
25
# See wiki/config/logging/... for some sample config files.
26
#from MoinMoin import log
27
#log.load_config('/path/to/logging_configuration_file')
29
# Debug mode - show detailed error reports
30
#os.environ['MOIN_DEBUG'] = '1'
33
from MoinMoin.server import daemon
34
from mointwisted import Config
37
class TwistedScript(daemon.DaemonScript):
40
""" Override to use twistd daemonizer """
41
os.system('twistd --python mointwisted.py --pidfile %s' % self.pidFile)
44
script = TwistedScript(Config.name, None)