view wiki/server/mointwisted @ 643:8ed1a953d12e

fix the server adaptor scripts to hopefully match the new request module
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 12 May 2006 23:14:20 +0200
parents 77665d8e2254
children caad2c46e525
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.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()