view wiki/server/mointwisted @ 3505:cd43bbf56c33

logging: removed logging to ./moin.log from fallback config, better docs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Apr 2008 18:47:57 +0200
parents 79f850129782
children fc2f05f2b0bd
line wrap: on
line source
#!/usr/bin/env python
"""
    mointwisted - control MoinMoin Twisted server

    @copyright: 2004-2005 Thomas Waldmann, Nir Soffer
    @license: GNU GPL, see COPYING for details.
"""

# Add the path to mointwisted.py directory 
## import sys
## sys.path.insert(0, '/path/to/mointwisted')

import os

from MoinMoin import log
log.load_config('wiki/config/logging/logfile') # XXX please fix this path!

from MoinMoin.server import daemon
from mointwisted import Config


class TwistedScript(daemon.DaemonScript):

    def do_start(self):
        """ Override to use twistd daemonizer """
        os.system('twistd --python mointwisted.py --pidfile %s' % self.pidFile)


script = TwistedScript(Config.name, None)
script.run()