From 2e1bdb6d27facaddc73b9e0009f9b574ca5dcc8f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 20 Nov 2008 20:48:02 +0100 Subject: [PATCH] Update wipi.cfgi to load the correct config. Make it load the config file relative to its own location. Also, strip out some unneeded stuff from the file. --- wipi.fcgi | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/wipi.fcgi b/wipi.fcgi index 9146291..9795dcb 100755 --- a/wipi.fcgi +++ b/wipi.fcgi @@ -9,38 +9,21 @@ import sys, os -# a) Configuration of Python's code search path -# If you already have set up the PYTHONPATH environment variable for the -# stuff you see below, you don't need to do a1) and a2). +# Define the path to our config relative to where we are. +confdir = os.path.join(os.path.dirname(__file__), 'conf') -# a1) Path of the directory where the MoinMoin code package is located. -# Needed if you installed with --prefix=PREFIX or you didn't use setup.py. -#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages') +# Put our config in the python path +sys.path.insert(0, confdir) -# a2) Path of the directory where wikiconfig.py / farmconfig.py is located. -# See wiki/config/... for some sample config files. -#sys.path.insert(0, '/etc/moin') -sys.path.insert(0, '/etc/moin') - -# b) Configuration of moin's logging -# If you have set up MOINLOGGINGCONF environment variable, you don't need this! -# You also don't need this if you are happy with the builtin defaults. -# See wiki/config/logging/... for some sample config files. -#from MoinMoin import log -#log.load_config('/path/to/logging_configuration_file') +# Load a logging conf +from MoinMoin import log +log.load_config(os.path.join(confdir, 'logging.conf')) # Debug mode - show detailed error reports #os.environ['MOIN_DEBUG'] = '1' - from MoinMoin.server.server_fastcgi import FastCgiConfig, run - class Config(FastCgiConfig): - 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 + pass run(Config) - -- 2.30.2