X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fwipi.git;a=blobdiff_plain;f=wipi.fcgi;h=d953547e9467e999e9d47effaa1307abf7d60965;hp=07234d200ca494f7dfa0d8dd61e0ae5ea84d6692;hb=HEAD;hpb=b6298ce1f44ec0082056b7f6e0484f2fd1eb6bef diff --git a/wipi.fcgi b/wipi.fcgi index 07234d2..d953547 100755 --- a/wipi.fcgi +++ b/wipi.fcgi @@ -3,39 +3,26 @@ """ MoinMoin - FastCGI Driver Script - @copyright: 2007 MoinMoin:ThomasWaldmann + @copyright: 2008 MoinMoin:ThomasWaldmann @license: GNU GPL, see COPYING for details. """ -import sys, logging +import sys, os -# 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') +# Define the path to our config relative to where we are. +confdir = os.path.join(os.path.dirname(__file__), 'conf') -# Path of the directory where wikiconfig.py is located. -# YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP. -#sys.path.insert(0, '/etc/moin') +# Put our config in the python path +sys.path.insert(0, confdir) -import os -# Path of the directory where farmconfig is located (if different). -sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'conf')) +# Load a logging conf +from MoinMoin import log +log.load_config(os.path.join(confdir, 'logging.conf')) -# Debug mode - show detailed error reports -#import os -#os.environ['MOIN_DEBUG'] = '1' - -from MoinMoin.server.server_fastcgi import FastCgiConfig, run - -class Config(FastCgiConfig): - #loglevel_file = logging.DEBUG # adapt if you don't like the default - logPath = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'logs', 'wipi.log') - - properties = {} - # properties = {'script_name': '/'} # use this instead of the line above if your wiki runs under "/" url - - # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value! - # backlog = 1 - -run(Config) +from MoinMoin.web.flup_frontend import CGIFrontEnd +options = [ + # Show errors in the output + #"--debug", "web", + ] +CGIFrontEnd().run(options)