#!/usr/bin/env python """ mointwisted - control MoinMoin Twisted server @copyright: 2004-2005 Thomas Waldmann, Nir Soffer @license: GNU GPL, see COPYING for details. """ import sys # Path to MoinMoin package, needed if you installed with --prefix=PREFIX # or if you did not use setup.py. ## sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages') # Add the path to mointwisted.py directory ## 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()